.d1d-account {
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  --font-latin: ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: #ddffdc;
  font-family: var(--font);
}

.d1d-account * { box-sizing: border-box; }

.d1d-account button,
.d1d-account input {
  font: inherit;
}

.d1d-account-full {
  margin: 0 auto;
  padding: 1.6rem 1.4rem;
  border: 1px solid #2a3a34;
  border-radius: 8px;
  background: rgba(10, 16, 18, 0.86);
}

.d1d-account-compact {
  width: min(92vw, 1120px);
  margin: .8rem auto 0;
  padding: .85rem 1rem;
  border: 1px solid #2a3a34;
  border-radius: 8px;
  background: rgba(10, 16, 18, 0.72);
}

.d1d-kicker {
  margin: 0;
  color: #53e0b7;
  font-family: var(--font-latin);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.d1d-account h2 {
  margin: .35rem 0 .5rem;
  font-size: 1.35rem;
}

.d1d-account p,
.d1d-note {
  margin: 0;
  color: #8cab87;
  line-height: 1.7;
}

.d1d-status {
  margin: .7rem 0 0;
  color: #86ffd9;
  font-size: .95rem;
}

.d1d-status.is-error { color: #ffb4b4; }

.d1d-form {
  display: grid;
  gap: .7rem;
  margin-top: 1rem;
}

.d1d-form label {
  display: grid;
  gap: .35rem;
  color: #ddffdc;
  font-weight: 700;
}

.d1d-form input {
  width: 100%;
  max-width: 28rem;
  padding: .7rem .85rem;
  border: 1px solid #2a3a34;
  border-radius: 8px;
  background: #0c1411;
  color: #ddffdc;
}

.d1d-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.d1d-actions button,
.d1d-actions a {
  padding: .55rem .9rem;
  border: 0;
  border-radius: 999px;
  background: #53e0b7;
  color: #07101d;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.d1d-form label.d1d-consent {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  font-weight: 600;
  color: #8cab87;
}

.d1d-form label.d1d-consent input {
  width: auto;
  margin-top: .2rem;
}

.d1d-actions button.ghost,
.d1d-actions a.ghost {
  background: transparent;
  color: #53e0b7;
  box-shadow: inset 0 0 0 2px #53e0b7;
}

.d1d-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.d1d-players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: .7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.d1d-player {
  padding: .85rem .9rem;
  border-radius: 8px;
  background: #0c1411;
}

.d1d-player h3 {
  margin: 0 0 .5rem;
  color: #86ffd9;
  font-size: 1rem;
}

.d1d-player ol {
  display: grid;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.d1d-player li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35rem .6rem;
  align-items: baseline;
  color: #8cab87;
  font-size: .85rem;
  line-height: 1.45;
}

.d1d-player time {
  color: #677d64;
  font-size: .78rem;
  white-space: nowrap;
}

.d1d-empty {
  margin: 1rem 0 0;
  padding: .9rem;
  border-radius: 8px;
  background: #0c1411;
  color: #8cab87;
}

.d1d-account a:focus-visible,
.d1d-account button:focus-visible,
.d1d-account input:focus-visible {
  outline: 3px solid #f5f7fb;
  outline-offset: 3px;
}

.d1d-comment {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem 1.1rem;
  align-items: start;
  margin: 0 0 1rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid #2a3a34;
  border-radius: 8px;
  background: rgba(10, 16, 18, 0.86);
}

.d1d-comment img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
}

.d1d-comment-copy h2 {
  margin: .3rem 0 .55rem;
  font-size: 1.25rem;
}

.d1d-comment-bubble {
  position: relative;
  margin: 0;
  padding: .85rem 1rem;
  border-radius: 6px;
  background: #0c1411;
  color: #ddffdc;
  line-height: 1.7;
}

.d1d-comment-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 1.1rem;
  border: 8px solid transparent;
  border-right-color: #0c1411;
}

.d1d-comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  margin: .65rem 0 0;
  color: #677d64;
  font-size: .78rem;
}

.d1d-comment-meta time:empty { display: none; }

@media (max-width: 620px) {
  .d1d-players { grid-template-columns: 1fr; }
  .d1d-player li { grid-template-columns: 1fr; }
  .d1d-comment { grid-template-columns: 56px minmax(0, 1fr); padding: 1rem; }
  .d1d-comment img { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .d1d-comment-bubble::before { animation: none; }
}
