/* The context lives in the image. Navigation occupies one narrow strip. */
:root {
  --day-paper: #f2ebd6;
  --day-brass: #dbb16f;
  --day-dim: #acb6aa;
  --day-dark: #111a1b;
}
.landing .cover {
  height: calc(100svh - 68px);
  min-height: 430px;
  max-height: none;
}
.landing .cover-content {
  max-width: 740px;
}
.landing .cover-content h1,
.day-subject h1,
.day-banner h1,
.day-next > p,
.act-text h2 {
  font-family: "PingFang TC", "Microsoft JhengHei", sans-serif;
}
.day-layout {
  color: var(--day-paper);
  background: var(--day-dark);
  min-height: 100svh;
}
.day-mast {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 max(18px, calc((100% - 1160px) / 2));
  background: #132020;
}
.day-brand,
.day-mast nav button,
.day-settings,
.day-identity {
  border: 0;
  background: none;
}
.day-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 4px;
  color: #ecddbd;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.15em;
}
.day-brand svg {
  color: var(--day-brass);
  width: 28px;
  height: 28px;
}
.day-mast nav {
  margin-left: auto;
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 6px;
}
.day-mast nav button,
.day-settings {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #a7b8af;
}
.day-mast nav button[aria-current] {
  color: var(--day-paper);
  box-shadow: inset 0 -2px var(--day-brass);
  border-radius: 0;
}
.day-layout .day-main {
  margin: 0 auto;
  padding: 0 0 40px;
  max-width: 1160px;
  width: 100%;
  background: none;
  min-height: 0;
}
.day-scene,
.day-banner,
.act-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #263832;
}
.day-scene {
  height: clamp(325px, 55svh, 660px);
}
.day-background,
.act-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  object-position: center;
}
.day-scene::after,
.day-banner::after,
.act-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #11181470 0%,
    transparent 23%,
    transparent 52%,
    #101a17e8 100%
  );
  z-index: -1;
}
.day-stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: absolute;
  left: clamp(16px, 4vw, 52px);
  top: 18px;
  color: #fff4df;
  font-size: 13px;
  text-shadow: 0 1px 4px #121a15;
}
.day-stamp span,
.day-state i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.day-subject,
.day-banner > div {
  position: absolute;
  bottom: clamp(17px, 3vw, 34px);
  left: clamp(16px, 4vw, 52px);
  right: 16px;
}
.day-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: start;
  max-width: 100%;
  padding: 2px 12px 2px 2px;
  color: #fff5dc;
  background: #15211fd4;
  border-radius: 4px;
}
.day-face {
  width: 52px;
  height: 58px;
  object-fit: cover;
  border-radius: 2px;
  flex: none;
}
.day-avatar {
  position: relative;
  display: inline-flex;
  flex: none;
}
.day-role,
.day-fitting {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: #202d27;
  color: #efc07d;
}
.day-fitting {
  right: auto;
  left: 0;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
}
.day-identity strong,
.day-identity small {
  display: block;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.day-identity strong {
  font-size: 15px;
  max-width: 48ch;
}
.day-identity small {
  font-size: 12px;
  color: #e8d4af;
}
.day-subject h1,
.day-banner h1 {
  font-size: clamp(25px, 3.5vw, 46px);
  line-height: 1.25;
  letter-spacing: 0.06em;
  margin: 10px 0 0;
  text-shadow: 0 2px 12px #111b17;
}
.day-next,
.day-paper,
.day-recent,
.day-secondary {
  padding: 20px clamp(16px, 4vw, 52px);
}
.day-next {
  padding-top: 14px;
}
.day-state {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #c4cbbb;
  flex-wrap: wrap;
}
.day-state svg {
  color: var(--day-brass);
}
.day-next > p {
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.75;
  color: var(--day-paper);
  margin: 9px 0 13px;
  max-width: 78ch;
}
.day-actions,
.trails,
.day-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.day-option {
  border: 1px solid #65756a;
  background: #22302b;
  color: #f4ebd5;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  text-align: left;
  min-height: 46px;
  padding: 9px 15px;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.day-option svg {
  color: #dfbf86;
}
.day-actions .day-option:first-child {
  background: #e5c58f;
  color: #202822;
  border-color: #e5c58f;
}
.day-actions .day-option:first-child svg {
  color: #3b4435;
}
.day-recent {
  padding-top: 12px;
  border-top: 1px solid #35433c;
  max-width: 100%;
}
.day-recent > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.day-recent h2,
.day-paper h2 {
  font-size: 16px;
}
.day-recent p {
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.day-recent p b {
  color: #dacfad;
  font-weight: 550;
}
.day-banner {
  height: clamp(220px, 44svh, 480px);
}
.day-banner small {
  color: #f0d6a7;
}
.day-paper p {
  color: #dfdecf;
  margin-bottom: 14px;
}
.day-paper h2 {
  margin: 20px 0 10px;
}
.day-main .panel,
.day-main .e-panel {
  border-radius: 0;
  border-width: 0;
  background: #192321;
}
.day-main .peoplegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
}
.day-main .person {
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  overflow: hidden;
}
.day-main .person > img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: 50% 32%;
  border-radius: 2px;
}
.day-main .person > span {
  padding: 6px 0;
  overflow-wrap: anywhere;
}
.day-main .person > .ico {
  display: none;
}
.day-main .scene-band {
  min-height: 220px;
  height: clamp(220px, 43svh, 450px);
}
.day-main .scene-band img {
  height: 100%;
  object-fit: cover;
}
.day-main .jobgrid {
  max-height: none;
}
.day-resident {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.day-resident .day-face {
  width: 90px;
  height: 100px;
}
.day-resident > div {
  min-width: 0;
}
.day-resident h2 {
  overflow-wrap: anywhere;
  font-size: 21px;
}
.day-goal {
  margin: 14px 0 22px;
}
.day-goal label {
  display: block;
  margin-bottom: 7px;
}
.day-goal progress {
  width: 100%;
  height: 8px;
  accent-color: var(--day-brass);
}
.day-background-notes {
  font-size: 14px;
  border-top: 1px solid #444f47;
  padding: 10px 0;
}
.day-background-notes summary,
.person-stats summary {
  cursor: pointer;
  min-height: 36px;
  color: #dec59e;
}
dialog .day-secondary {
  padding: 14px 0 0;
  margin-top: 12px;
  border-top: 1px solid #435047;
}
dialog.performing {
  padding: 0;
  width: min(660px, calc(100% - 20px));
  background: #172321;
  overflow: auto;
  border-color: #6b7663;
}
.act-art {
  height: clamp(180px, 34svh, 355px);
}
.act-art > img {
  animation: act-pan 5s ease-out both;
}
.act-cast {
  position: absolute;
  bottom: 14px;
  left: 20px;
  animation: act-enter 0.5s ease-out;
}
.act-cast .day-face {
  width: 70px;
  height: 77px;
  box-shadow: 0 2px 12px #0008;
}
.act-text {
  padding: 16px 20px 18px;
}
.act-text h2 {
  margin: 0;
  font-size: 22px;
}
.act-text p {
  min-height: 24px;
  color: #dfd7bf;
  margin: 6px 0;
}
.act-track {
  height: 5px;
  overflow: hidden;
  background: #37453e;
  margin: 14px 0;
}
.act-track i {
  display: block;
  height: 100%;
  background: #e1bb7c;
  transform-origin: left;
  animation: act-fill var(--duration) linear both;
}
.act-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.act-controls button {
  min-height: 44px;
}
.act-controls button:first-child {
  margin-right: auto;
}
.act-branch {
  margin-bottom: 8px;
}
.act-branch[hidden] {
  display: none;
}
@keyframes act-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes act-pan {
  from {
    transform: scale(1.015);
  }
  to {
    transform: scale(1.055) translateX(-0.5%);
  }
}
@keyframes act-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 680px) {
  .landing .cover {
    height: calc(100svh - 54px);
  }
  .day-mast {
    padding: 0 8px;
    gap: 2px;
  }
  .day-mast nav {
    gap: 0;
  }
  .day-mast nav button {
    font-size: 14px;
    padding: 0 8px;
  }
  .day-scene {
    height: clamp(280px, 48svh, 500px);
  }
  .day-subject .day-face {
    width: 44px;
    height: 49px;
  }
  .day-actions .day-option {
    flex: 1 1 calc(50% - 8px);
    font-size: 15px;
    padding: 9px 10px;
    min-width: 0;
  }
  .day-next {
    padding-bottom: 16px;
  }
  .day-recent {
    padding-top: 8px;
  }
  .day-recent .textbtn {
    min-height: 44px;
  }
  .day-main .peoplegrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .day-main .scene-band {
    height: 33svh;
    min-height: 190px;
  }
  .day-identity strong {
    font-size: 14px;
  }
  .day-mast .day-brand {
    font-size: 15px;
  }
  .day-brand svg {
    width: 23px;
  }
}
@media (max-width: 360px) {
  .day-mast nav button {
    padding: 0 5px;
  }
  .day-mast nav .ico {
    display: none;
  }
  .day-option {
    font-size: 14px;
  }
}
.reduce .act-art > img,
.reduce .act-cast {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .act-art > img,
  .act-cast {
    animation: none;
  }
}
