.owner-nav {
  max-width: 1240px;
  margin: auto;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.owner-nav nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.owner-nav nav a {
  text-decoration: none;
  font-weight: 700;
}
.owner-nav .brand {
  font-size: 30px;
}
.account-email {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.text-button {
  background: none;
  color: var(--ink);
  padding: 8px;
  min-height: 44px;
}
.owner-main {
  max-width: 1160px;
  margin: 24px auto 80px;
  padding: 0 36px;
}
.owner-main h1 {
  font-size: clamp(40px, 5vw, 64px);
  margin-bottom: 20px;
}
.owner-main h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
}
.owner-main .intro {
  font-size: 20px;
  line-height: 1.5;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 14px;
  background: var(--cobalt);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.owner .secondary {
  background: #e9edff;
  color: var(--cobalt);
}
.owner label {
  display: block;
  font-weight: 700;
  margin: 24px 0 10px;
}
.small-page {
  max-width: 470px;
  margin: 72px auto;
}
.small-page form button {
  width: 100%;
  margin-top: 24px;
}
.small-page p {
  line-height: 1.6;
}
.terms-agreement {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
}
.terms-agreement input[type="checkbox"] {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--cobalt);
}
.owner .terms-agreement label {
  margin: 0;
  line-height: 1.6;
}
.terms-page {
  max-width: 720px;
  margin: 64px auto;
  line-height: 1.7;
}
.terms-page h1 {
  line-height: 1.1;
}
.terms-page h2 {
  margin: 32px 0 12px;
}
.terms-page p {
  margin-bottom: 16px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 40px 0 32px;
}
.page-heading h1 {
  margin-bottom: 12px;
}
.empty-state {
  text-align: center;
  padding: 55px 20px 80px;
}
.empty-mark {
  font-size: 90px;
  color: var(--coral);
  line-height: 1.4;
}
.empty-state p {
  color: var(--muted);
  margin-bottom: 28px;
}
.game-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.game-card {
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 20px;
}
.game-card h2 {
  font-size: 30px;
  margin: 24px 0 16px;
  overflow-wrap: anywhere;
}
.game-card h2 a {
  text-decoration: none;
}
.game-card p {
  margin-bottom: 14px;
}
.status {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  background: var(--lemon);
  padding: 7px 12px;
  border-radius: 8px;
}
.status-finished {
  background: var(--line);
}
.status-playing,
.status-rules {
  background: var(--coral);
}
.status-lobby {
  background: #dce8ff;
}
.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.muted,
.field-help {
  color: var(--muted);
}
.field-help {
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0;
}
.back-link {
  font-weight: 700;
}
.share-panel {
  background: var(--lemon);
  padding: 28px 32px;
  border-radius: 20px;
  margin-bottom: 40px;
}
.share-panel h2 {
  margin-bottom: 10px;
}
.share-input {
  display: flex;
  gap: 12px;
}
.share-input input {
  background: var(--paper);
  border-color: transparent;
  min-width: 0;
}
.share-input button {
  white-space: nowrap;
}
.setup-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 64px;
}
.setup-layout:has(.settings-panel:only-child) {
  display: block;
  max-width: 570px;
}
.owner fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.owner fieldset button {
  margin-top: 24px;
}
.owner fieldset:disabled input {
  background: #f2f3f8;
  color: var(--muted);
}
.owner textarea {
  min-height: 90px;
}
.statements {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.statement-row {
  border-bottom: 2px solid var(--line);
  padding: 18px 0;
}
.statement-row.disabled .statement-copy {
  color: var(--muted);
  text-decoration: line-through;
}
.statement-copy {
  font-size: 20px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.statement-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.statement-tools button {
  padding: 8px 12px;
  min-height: 44px;
  font-size: 14px;
}
.statement-tools .toggle {
  background: #e9edff;
  color: var(--cobalt);
}
.statement-row.disabled .toggle {
  background: var(--line);
  color: var(--muted);
}
.drag-handle {
  cursor: grab;
  color: var(--muted);
  padding: 10px;
  font-size: 22px;
}
.statement-row.dragging {
  opacity: 0.45;
}
.statement-row.drop-target {
  border-top: 3px solid var(--cobalt);
}
.statement-edit textarea {
  margin-bottom: 8px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading h2 {
  margin-bottom: 0;
}
#statement-count {
  font-size: 18px;
  color: var(--muted);
  margin-left: 8px;
}
.delete-panel {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 2px solid var(--line);
}
.delete-panel p {
  font-size: 14px;
  margin-top: 8px;
}
.danger-text {
  color: #ac2532;
}
.danger {
  background: #b52c3a;
  color: white;
}
.notice,
.owner-error {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 24px;
  border-radius: 12px;
  max-width: calc(100% - 32px);
  width: max-content;
  box-shadow: 0 4px 30px #19265b22;
  z-index: 20;
}
.notice {
  background: var(--ink);
  color: white;
}
.owner-error {
  background: #ffe2de;
  color: #872532;
}
.inline-error,
#join-error {
  color: #9a2630;
  line-height: 1.5;
}
.success {
  padding: 16px;
  border: 2px solid var(--cobalt);
  border-radius: 12px;
}
.owner dialog {
  border: 0;
  border-radius: 20px;
  padding: 32px;
  color: var(--ink);
  max-width: 480px;
  width: calc(100% - 32px);
}
.owner dialog::backdrop {
  background: #19265b77;
}
.owner dialog p {
  line-height: 1.5;
}
.owner button:disabled {
  opacity: 0.55;
}
@media (max-width: 850px) {
  .owner-nav {
    align-items: flex-start;
    padding: 22px 24px;
  }
  .owner-nav nav {
    gap: 12px 18px;
    justify-content: flex-end;
  }
  .account-email {
    width: 100%;
    text-align: right;
    order: 2;
  }
  .owner-main {
    padding: 0 24px;
  }
  .setup-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .settings-panel {
    max-width: 570px;
  }
}
@media (max-width: 600px) {
  .owner-nav {
    display: block;
  }
  .owner-nav nav {
    justify-content: flex-start;
    margin-top: 20px;
  }
  .account-email {
    width: auto;
    max-width: 100%;
    text-align: left;
  }
  .owner-main {
    margin-top: 16px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 24px;
  }
  .game-list {
    grid-template-columns: 1fr;
  }
  .small-page {
    margin: 36px auto;
  }
  .share-panel {
    padding: 22px;
  }
  .share-input {
    flex-direction: column;
  }
  .share-input button {
    align-self: flex-start;
  }
  .share-panel input {
    font-size: 14px;
  }
  .game-card {
    padding: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* The public landing page keeps its original cobalt identity. */
.home .owner-nav {
  max-width: none;
  padding: 0;
}
.home .account-email,
.home .text-button {
  color: var(--paper);
}
.home .account-email {
  opacity: 0.85;
}
.home .owner-nav .button {
  background: var(--coral);
  color: var(--ink);
}
.home #join-error {
  color: var(--paper);
  margin-top: 14px;
}
