.daily-path,
.daily-dialog {
  --daily-ink: #183e49;
  --daily-line: #b3cccf;
  --daily-accent: #e2f4ec;
  --daily-paper: #fffef9;
  color: var(--daily-ink);
}

.daily-path {
  margin-block-end: 18px;
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid var(--daily-line);
  border-radius: 24px;
  background: linear-gradient(125deg, #f7fbff, #ebf7f0 65%, #fff5dc);
}

.daily-path-head,
.daily-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.daily-path-head {
  flex-wrap: wrap;
}

.daily-path h3,
.daily-dialog h2,
.daily-dialog h3,
.daily-dialog h4 {
  margin: 0;
}

.daily-path h3 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.daily-path p {
  margin: 6px 0 12px;
}

.daily-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.daily-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-inline-size: 56px;
  min-block-size: 56px;
  padding: 6px 12px;
  border: 1px solid var(--daily-line);
  border-radius: 14px;
  background: var(--daily-paper);
  color: var(--daily-ink);
  font: inherit;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  overflow-wrap: anywhere;
}

.daily-button:disabled {
  background: #eef1f2;
  color: #52676b;
  cursor: default;
}

.daily-button:active:not(:disabled),
.daily-room-open,
.daily-report-open {
  background: var(--daily-accent);
}

.daily-button:focus-visible,
.room-object:focus-visible {
  outline: 3px solid #156cc1;
  outline-offset: 2px;
}

.daily-game > span:first-child {
  font-size: 1.25rem;
  flex: none;
}

.daily-game:has(.daily-sr) {
  background: #d9f2e2;
}

.daily-sticker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  margin-block-start: 12px;
  padding: 10px 14px;
  border: 1px solid #dcc37f;
  border-radius: 14px;
  background: #fff3cb;
  color: #573d17;
}

.daily-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.daily-dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  background: var(--daily-paper);
  overscroll-behavior: contain;
}

.daily-dialog-bar {
  position: sticky;
  z-index: 2;
  inset-block-start: 0;
  padding: 8px clamp(12px, 3vw, 24px);
  background: #e9f4f1;
  border-block-end: 1px solid var(--daily-line);
}

.daily-dialog-bar .daily-button {
  font-size: 1.6rem;
  flex: none;
}

.daily-dialog-content {
  padding: clamp(12px, 3vw, 24px);
}

.daily-win {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px;
  text-align: center;
}

.daily-win > span {
  font-size: clamp(3.5rem, 12vw, 6rem);
}

.daily-win .daily-button {
  background: var(--daily-accent);
}

.daily-report-open {
  --daily-ink: #183e49;
  --daily-line: #b3cccf;
  --daily-accent: #e2f4ec;
  margin-block: 8px;
}

.daily-report-card {
  margin-block-end: 16px;
  padding: clamp(12px, 3vw, 20px);
  border: 1px solid var(--daily-line);
  border-radius: 16px;
  overflow-wrap: anywhere;
}

.daily-report-card h4 {
  margin-block-start: 14px;
}

.daily-report-card ul,
.daily-report-card ol {
  margin-block: 6px 0;
  padding-inline-start: 20px;
}

.daily-report-card .daily-bars,
.daily-report-card .daily-skills {
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.daily-bars li {
  display: grid;
  grid-template-columns: minmax(46px, max-content) 1fr minmax(64px, max-content);
  align-items: center;
  gap: 10px;
}

.daily-bar {
  display: block;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f4;
}

.daily-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #307d86;
}

.daily-skills li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block-end: 4px;
  border-block-end: 1px solid #e8eded;
}

.daily-report-card ol li {
  margin-block-end: 6px;
}

.daily-report-card ol span {
  display: block;
}

dialog.nono-room {
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #f3f8f6;
}

.room-layout {
  display: grid;
  grid-template-rows: auto auto minmax(184px, 1fr) auto auto;
  gap: 6px;
  min-height: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding: env(safe-area-inset-top) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

.room-layout .daily-dialog-bar {
  position: static;
  padding-inline: 2px;
  border: 0;
  background: transparent;
}

.room-tip {
  margin: 0;
  text-align: center;
  line-height: 1.2;
}

.room-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(transparent 61%, #bf8b62 61% 64%, transparent 64%),
    repeating-linear-gradient(0deg, transparent 0 28px, #af77554a 29px 31px) center bottom / 100% 36% no-repeat,
    linear-gradient(#efe9fc 0 33%, #e0d7f4 61%, #e7bb90 64%, #f6d8af 100%);
  box-shadow: inset 0 0 0 1px #7969a85e;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.room-tools,
.room-tray-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.room-tools .daily-button,
.room-tray-nav .daily-button {
  font-size: 1.35rem;
}

.room-tray {
  display: grid;
  gap: 6px;
}

.room-page {
  min-width: 3.25rem;
  text-align: center;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.nono-room[dir="rtl"] .room-arrow span {
  transform: scaleX(-1);
}

.room-tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.room-tile {
  padding: 4px;
  font-size: .85rem;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
}

.room-art {
  display: grid;
  place-items: center;
  pointer-events: none;
  font-size: inherit;
}

.room-art > * {
  grid-area: 1 / 1;
}

.room-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.room-art [hidden] {
  display: none;
}

.room-tile .room-art {
  width: 30px;
  height: 32px;
  flex: none;
  font-size: 1.4rem;
}

.room-object {
  position: absolute;
  z-index: 0;
  display: grid;
  place-items: stretch;
  min-width: 56px;
  min-height: 56px;
  border: 0;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  container-type: inline-size;
  transform: translate(-50%, -50%);
  touch-action: none;
  cursor: grab;
}

.room-object .room-icon {
  font-size: 3rem;
  font-size: 72cqi;
  line-height: 1;
}

.room-object[aria-pressed="true"] {
  outline: 3px solid #3b658f;
  outline-offset: -3px;
}

.room-ghost {
  position: fixed;
  z-index: 5;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  font-size: 2.75rem;
}

@media (max-width: 640px) {
  .daily-game {
    flex-direction: column;
    padding-inline: 6px;
    font-size: .9rem;
  }

  .room-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .room-layout {
    grid-template-columns: minmax(0, 1fr) minmax(188px, 28%);
    grid-template-rows: auto auto minmax(152px, 1fr) auto;
  }

  .room-layout .daily-dialog-bar,
  .room-tip {
    grid-column: 1 / -1;
  }

  .room-stage {
    grid-column: 1;
    grid-row: 3 / 5;
  }

  .room-tray {
    grid-column: 2;
    grid-row: 3;
    align-content: start;
  }

  .room-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-tools {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .daily-path *,
  .daily-dialog *,
  .daily-sticker {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}
