:root {
  --bg-deep: #080d11;
  --bg-base: #0c1318;
  --surface: #111b21;
  --surface-strong: #16232a;
  --surface-soft: #18272e;
  --line: #2b3d46;
  --line-strong: #3a515d;
  --text: #f1f8fa;
  --muted: #91a9b3;
  --faint: #647b85;
  --cyan: #82e4f4;
  --cyan-strong: #36bdd7;
  --mint: #78dab4;
  --pink: #dca7da;
  --warm: #e9c49e;
  --danger: #ef7e87;
  --radius: 8px;
  --page-top-row-height: 52px;
  --page-top-control-height: 34px;

  color: var(--text);
  background: var(--bg-deep);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  background: var(--bg-deep);
}

body {
  min-height: 100vh;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

button:not(:disabled):active {
  transform: translateY(1px) scale(0.985);
}

[hidden] {
  display: none !important;
}

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

.app-frame {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgb(130 228 244 / 0.04), transparent 34%),
    linear-gradient(315deg, rgb(120 218 180 / 0.03), transparent 26%),
    var(--bg-deep);
}

.product-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  transition:
    filter 240ms ease,
    opacity 240ms ease,
    transform 240ms ease;
}

body.is-announcement-open .product-shell {
  filter: blur(1.5px) saturate(88%);
  opacity: 0.84;
  transform: scale(0.996);
  pointer-events: none;
  user-select: none;
}

.resource-strip {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(180px, 0.78fr) minmax(0, 3.22fr);
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 10px 16px;
  background: rgb(10 16 20 / 0.92);
  border-bottom: 1px solid #263840;
  box-shadow: 0 10px 34px rgb(0 0 0 / 0.16);
  backdrop-filter: blur(16px) saturate(122%);
}

.product-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.product-identity > span:last-child {
  display: grid;
  min-width: 0;
}

.product-identity strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-identity small {
  overflow: hidden;
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--cyan);
  background: rgb(130 228 244 / 0.09);
  border: 1px solid rgb(130 228 244 / 0.28);
  border-radius: 7px;
}

.product-mark svg {
  width: 21px;
  height: 21px;
}

.resource-summary {
  display: grid;
  grid-template-columns:
    minmax(104px, 1.12fr)
    minmax(98px, 1.08fr)
    minmax(82px, 0.9fr)
    minmax(82px, 0.9fr)
    minmax(132px, 1.18fr)
    minmax(132px, 1.18fr);
  min-width: 0;
  padding: 0;
  margin: 0;
}

.summary-item {
  min-width: 0;
  min-height: 50px;
  padding: 4px 11px;
  border-left: 1px solid #293b44;
}

.summary-item dt {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-item dt svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.summary-item dd {
  min-width: 0;
  margin: 5px 0 0;
  color: var(--text);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.summary-item.is-forecast dd {
  color: var(--cyan);
}

.summary-item.is-rainbow dt svg {
  color: var(--pink);
}

.summary-item.is-gold dt svg {
  color: var(--warm);
}

.summary-item.is-compound dd {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-family: inherit;
  font-size: 0.82rem;
}

.summary-item.is-compound dd span {
  display: flex;
  gap: 5px;
  align-items: baseline;
  min-width: 0;
}

.summary-item.is-compound dd small {
  color: var(--faint);
  font-size: 0.6rem;
  white-space: nowrap;
}

.summary-item.is-compound dd strong {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.summary-number {
  display: inline-block;
  min-width: 4ch;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  text-align: right;
}

.summary-number.is-gems {
  min-width: 7ch;
}

.workspace {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 0;
}

.side-rail {
  position: relative;
  display: grid;
  grid-auto-rows: 66px;
  align-content: start;
  gap: 5px;
  min-height: 0;
  padding: 14px 8px;
  background: #0d151a;
  border-right: 1px solid #24353d;
}

.side-rail-indicator {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  background: rgb(130 228 244 / 0.1);
  border: 1px solid rgb(130 228 244 / 0.3);
  border-radius: 6px;
  transition:
    width 180ms ease,
    height 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.side-rail button {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  place-items: center;
  padding: 6px 4px;
  color: #79919b;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition:
    color 140ms ease,
    transform 90ms ease;
}

.side-rail button:hover {
  color: #bad1d9;
}

.side-rail button.is-active {
  color: var(--text);
}

.side-rail button svg {
  width: 20px;
  height: 20px;
}

.side-rail button span {
  font-size: 0.7rem;
}

.main-view {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 clamp(18px, 3vw, 34px) clamp(18px, 3vw, 34px);
  scrollbar-gutter: stable both-edges;
}

.product-page {
  width: min(1240px, 100%);
  min-width: 0;
  max-width: 100%;
  min-height: 100%;
  margin: 0 auto;
}

.product-page.is-active {
  animation: page-enter 220ms ease-out both;
}

.product-page[data-page="future"] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  gap: 16px;
  align-items: center;
  height: var(--page-top-row-height);
  min-height: var(--page-top-row-height);
  padding-block: 8px;
}

.calendar-projection-state,
.calendar-updated-at {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.3;
}

.calendar-projection-state svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--cyan);
}

.calendar-updated-at {
  justify-content: flex-end;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-updated-at time {
  color: #c6d8de;
  font-family: "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.month-controls {
  position: relative;
  display: grid;
  grid-template-columns:
    var(--page-top-control-height)
    minmax(112px, auto)
    var(--page-top-control-height);
  gap: 8px;
  align-items: center;
  height: var(--page-top-control-height);
}

.month-controls strong {
  position: relative;
  display: grid;
  height: var(--page-top-control-height);
  place-items: center;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

.month-controls.is-pending strong::after {
  position: absolute;
  top: 50%;
  right: -15px;
  width: 8px;
  height: 8px;
  content: "";
  border: 1px solid rgb(130 228 244 / 0.28);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.icon-button {
  display: inline-grid;
  width: var(--page-top-control-height);
  height: var(--page-top-control-height);
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    transform 90ms ease;
}

.icon-button:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}

.icon-button:disabled {
  color: #43565e;
  border-color: #203039;
  cursor: not-allowed;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.calendar-surface {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden auto;
  background: rgb(13 20 25 / 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.calendar-surface::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.calendar-status {
  position: absolute;
  z-index: 9;
  inset: 20px 0 0;
  display: grid;
  gap: 9px;
  place-items: center;
  place-content: center;
  min-height: 280px;
  color: var(--muted);
  font-size: 0.78rem;
  background: rgb(10 16 20 / 0.82);
  backdrop-filter: blur(6px);
}

.calendar-status.is-error {
  color: #f3c2c6;
}

.calendar-status.is-error svg {
  width: 22px;
  height: 22px;
  color: var(--danger);
}

.status-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgb(130 228 244 / 0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.calendar-weekdays,
.calendar-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  position: sticky;
  z-index: 8;
  top: 0;
  background: #111b21;
  border-bottom: 1px solid var(--line);
}

.calendar-weekdays span {
  padding: 2px 4px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.1;
  text-align: center;
}

.calendar-week {
  --calendar-lane-pitch: 25px;
  --calendar-row-height: calc(
    66px + var(--calendar-lanes) * var(--calendar-lane-pitch)
  );

  position: relative;
  min-height: max(112px, var(--calendar-row-height));
  border-bottom: 1px solid #23343c;
}

.calendar-week:last-child {
  border-bottom: 0;
}

.calendar-day-grid {
  position: absolute;
  inset: 0;
}

.calendar-day {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  min-width: 0;
  padding: 7px 8px;
  border-right: 1px solid #22323a;
}

.calendar-day:last-child {
  border-right: 0;
}

.calendar-day time {
  display: block;
  color: #d7e4e8;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.calendar-day.is-outside time {
  color: #50646d;
}

.calendar-day.is-today::after {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(130 228 244 / 0.09);
}

.login-claim {
  position: absolute;
  bottom: 6px;
  left: 50%;
  color: #d8ebe9;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  white-space: nowrap;
}

.calendar-bars {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.calendar-bar {
  --event-rgb: 145 185 205;
  --calendar-bar-trailing-gap: 1px;
  --calendar-free-pull-active-bg: color-mix(
    in srgb,
    rgb(255 92 113) 24%,
    rgb(10 16 20)
  );
  --calendar-free-pull-idle-bg: color-mix(
    in srgb,
    rgb(96 220 142) 18%,
    rgb(10 16 20)
  );
  --calendar-free-pull-transition-bg: color-mix(
    in srgb,
    rgb(245 250 248) 82%,
    rgb(10 16 20)
  );
  --calendar-free-pull-active-border: rgb(255 92 113 / 0.56);
  --calendar-free-pull-idle-border: rgb(96 220 142 / 0.52);
  --calendar-free-pull-transition-border: rgb(245 250 248 / 0.92);

  position: absolute;
  top: calc(30px + var(--bar-lane) * var(--calendar-lane-pitch));
  left: var(--bar-left);
  display: flex;
  align-items: center;
  overflow: hidden;
  width: max(
    1px,
    calc(var(--bar-width) - var(--calendar-bar-trailing-gap))
  );
  height: calc(
    21px + (var(--bar-lane-span) - 1) * var(--calendar-lane-pitch)
  );
  padding: 3px 7px;
  color: #effafc;
  font-size: 0.61rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: color-mix(
    in srgb,
    rgb(var(--event-rgb)) 18%,
    rgb(10 16 20)
  );
  border: 1px solid rgb(var(--event-rgb) / 0.52);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}

.calendar-bar > * {
  position: relative;
  z-index: 1;
}

.calendar-bar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-bar.continues-before {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.calendar-bar.continues-after {
  --calendar-bar-trailing-gap: 0px;

  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.calendar-bar.is-gacha {
  --event-rgb: 96 220 142;
}

.calendar-bar.is-gacha-merged {
  gap: 3px;
  padding: 2px 6px;
}

.calendar-bar.is-gacha-merged.has-free-pull-window {
  --calendar-free-pull-open-left: 0px;
  --calendar-free-pull-open-right: 0px;

  background: var(--calendar-free-pull-background);
  border-color: transparent;
}

.calendar-bar.is-gacha-merged.has-free-pull-window::before {
  position: absolute;
  z-index: 0;
  inset:
    0
    calc(-1 * var(--calendar-free-pull-open-right))
    0
    calc(-1 * var(--calendar-free-pull-open-left));
  box-sizing: border-box;
  padding: 1px;
  content: "";
  background: var(--calendar-free-pull-border-background);
  background-position: var(--calendar-free-pull-open-left) 0;
  background-repeat: no-repeat;
  background-size:
    calc(
      100%
      - var(--calendar-free-pull-open-left)
      - var(--calendar-free-pull-open-right)
    )
    100%;
  border-radius: inherit;
  pointer-events: none;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.calendar-bar.is-gacha-merged.has-free-pull-window.continues-before {
  --calendar-free-pull-open-left: 1px;
}

.calendar-bar.is-gacha-merged.has-free-pull-window.continues-after {
  --calendar-free-pull-open-right: 1px;
}

.calendar-bar-thumbnails {
  display: flex;
  gap: 2px;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.calendar-bar.thumbnails-hidden .calendar-bar-thumbnails {
  display: none;
}

.calendar-bar-thumbnail-frame {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
}

.calendar-bar-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.calendar-bar-thumbnail-frame.is-uma .calendar-bar-thumbnail {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: calc(100% - 2px);
  height: auto;
  max-width: none;
  max-height: none;
  transform: translateX(-50%);
}

.calendar-bar.is-story_event {
  --event-rgb: 220 167 218;
}

.calendar-bar.is-training_challenge {
  --event-rgb: 176 184 190;
}

.calendar-bar.is-factor_research {
  --event-rgb: 184 128 224;
}

.calendar-bar.is-champions_meeting {
  --event-rgb: 240 194 76;
}

.calendar-bar.is-league_of_heroes {
  --event-rgb: 174 139 55;
}

.calendar-bar.is-legend_race {
  --event-rgb: 100 108 114;
}

.calendar-bar.is-best_team {
  --event-rgb: 92 168 232;
}

.preview-page,
.settings-page {
  padding-block: 24px 40px;
}

.preview-state {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--cyan);
  font-size: 0.72rem;
}

.preview-state svg {
  width: 16px;
  height: 16px;
}

.announcement-copy > p:first-child {
  margin: 0 0 3px;
  color: var(--cyan);
  font-size: 0.67rem;
}

.preview-lead {
  max-width: 720px;
  margin: 20px 0 0;
  color: #c5d6dc;
  font-size: 0.94rem;
  line-height: 1.8;
}

.preview-capabilities {
  display: grid;
  gap: 0;
  max-width: 720px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.preview-capabilities li {
  position: relative;
  padding: 15px 12px 15px 26px;
  color: var(--muted);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--line);
}

.preview-capabilities li::before {
  position: absolute;
  top: 50%;
  left: 6px;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--mint);
  border-radius: 50%;
  transform: translateY(-50%);
}

.settings-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-height: 36px;
  margin-bottom: 12px;
}

.settings-article-link {
  white-space: nowrap;
}

.secondary-command,
.feedback-command {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  color: #c9dbe1;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease;
}

.secondary-command:hover,
.feedback-command:hover {
  color: var(--text);
  background: var(--surface);
  border-color: rgb(130 228 244 / 0.45);
}

.secondary-command svg,
.feedback-command svg {
  width: 16px;
  height: 16px;
}

.statement-list {
  display: grid;
}

.statement-list > section {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.statement-list > section > svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--cyan);
}

.statement-list h2 {
  margin: 0;
  font-size: 0.84rem;
}

.statement-list p {
  max-width: 860px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.75;
}

.reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.reference-links a,
.settings-article-link {
  color: var(--cyan);
  font-size: 0.75rem;
  text-underline-offset: 4px;
}

.reference-links a:hover,
.settings-article-link:hover {
  color: #d5f8ff;
}

.feedback-command {
  margin-top: 24px;
}

.setup-layer {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  width: 100vw;
  height: 100dvh;
  padding: 16px;
  overflow: hidden;
  place-content: center;
  place-items: center;
}

.announcement-layer {
  opacity: 0;
  transition: opacity 180ms ease;
}

.announcement-layer.is-visible {
  opacity: 1;
}

.setup-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(3 8 11 / 0.14);
  backdrop-filter: blur(0.75px) brightness(84%);
}

.setup-depth {
  position: relative;
  z-index: 1;
  width: min(468px, calc(100vw - 24px));
  height: min(700px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  place-self: center;
  perspective: 1200px;
}

.setup-flip-shell {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: center;
  will-change: filter, transform;
}

.setup-card-depth-back {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  pointer-events: none;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: 10px 28px 76px rgb(0 0 0 / 0.4);
  backface-visibility: hidden;
  transform: translateZ(-8px);
}

.setup-card {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(138deg, rgb(220 249 255 / 0.09), transparent 22%),
    linear-gradient(318deg, rgb(90 180 198 / 0.05), transparent 34%),
    rgb(7 17 22 / 0.14);
  border: 1px solid rgb(218 247 252 / 0.34);
  border-radius: 8px;
  box-shadow:
    inset 1px 1px 0 rgb(255 255 255 / 0.2),
    inset -1px -1px 0 rgb(75 142 155 / 0.14),
    inset 0 0 24px rgb(151 224 237 / 0.04),
    0 24px 70px rgb(0 0 0 / 0.3);
  backface-visibility: hidden;
  backdrop-filter: blur(10px) saturate(138%) brightness(104%);
  transform: translateZ(1px);
  transform-style: preserve-3d;
}

.setup-card::before {
  position: absolute;
  z-index: 1;
  inset: -24% -54%;
  display: block;
  pointer-events: none;
  background: linear-gradient(
    116deg,
    transparent 34%,
    rgb(222 249 255 / 0.02) 39%,
    rgb(226 251 255 / 0.12) 43%,
    rgb(255 255 255 / 0.04) 48%,
    transparent 55%
  );
  content: "";
  mix-blend-mode: screen;
  transform: translate3d(-7%, 0, 2px);
}

.setup-pointer-light {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: block;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 118px 190px at var(--setup-light-x, 50%) var(--setup-light-y, 50%),
      rgb(230 252 255 / 0.15),
      rgb(145 225 239 / 0.05) 36%,
      transparent 70%
    ),
    linear-gradient(
      116deg,
      transparent 42%,
      rgb(233 252 255 / 0.03) 48%,
      transparent 54%
    );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 160ms ease;
}

.setup-card.is-pointer-lit .setup-pointer-light {
  opacity: 1;
}

.announcement-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 26px;
}

.announcement-copy {
  position: relative;
  z-index: 4;
  align-self: center;
  padding-block: 26px;
}

.announcement-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 1.72rem);
  line-height: 1.35;
}

.announcement-copy p:not(:first-child) {
  margin: 20px 0 0;
  color: #bdd0d7;
  font-size: 0.79rem;
  line-height: 1.85;
}

.announcement-close {
  position: relative;
  z-index: 4;
  display: grid;
  width: 42px;
  height: 42px;
  justify-self: center;
  padding: 0;
  place-items: center;
  color: var(--text);
  font-family: "Cascadia Code", Consolas, monospace;
  background: rgb(130 228 244 / 0.09);
  border: 1px solid rgb(130 228 244 / 0.34);
  border-radius: 7px;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 90ms ease;
}

.announcement-close:hover {
  background: rgb(130 228 244 / 0.16);
  border-color: rgb(130 228 244 / 0.55);
}

noscript {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  color: var(--text);
  background: var(--bg-deep);
}

@media (width <= 1060px) {
  .resource-strip {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .product-identity > span:last-child {
    display: none;
  }

  .resource-summary {
    grid-template-columns: repeat(3, minmax(104px, 1fr));
    row-gap: 7px;
  }

  .summary-item:nth-child(4) {
    border-left: 0;
  }
}

@media (width <= 760px) {
  body {
    overflow: auto;
  }

  .product-shell {
    height: 100dvh;
  }

  .resource-strip {
    position: sticky;
    top: 0;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    padding: 9px;
  }

  .product-mark {
    width: 38px;
    height: 38px;
  }

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

  .summary-item {
    min-height: 46px;
    padding: 3px 8px;
  }

  .summary-item:nth-child(odd) {
    border-left: 0;
  }

  .summary-item:nth-child(4) {
    border-left: 1px solid #293b44;
  }

  .summary-item dd {
    font-size: 1rem;
  }

  .summary-item.is-compound dd {
    gap: 8px;
  }

  .summary-item.is-compound dd small {
    display: none;
  }

  .summary-item.is-compound dd span + span::before {
    margin-right: 3px;
    color: var(--faint);
    content: "/";
  }

  .workspace {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 0;
  }

  .side-rail {
    grid-auto-rows: 60px;
    padding-inline: 6px;
  }

  .side-rail button span {
    font-size: 0.64rem;
  }

  .main-view {
    min-height: 0;
    overflow: hidden;
    padding: 0 10px 16px;
    scrollbar-gutter: auto;
  }

  .calendar-toolbar {
    grid-template:
      "month month" var(--page-top-row-height)
      "projection updated" 28px
      / minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 10px;
    height: auto;
    min-height: 80px;
    padding-block: 0;
  }

  .calendar-projection-state {
    grid-area: projection;
  }

  .month-controls {
    grid-area: month;
    justify-self: center;
  }

  .calendar-updated-at {
    grid-area: updated;
  }

  .month-controls strong {
    font-size: 0.7rem;
  }

  .calendar-week {
    min-height: max(106px, var(--calendar-row-height));
  }

  .calendar-day {
    padding: 7px 5px;
  }

  .calendar-day.is-today::after {
    top: 7px;
    right: 5px;
  }

  .calendar-bar {
    padding-inline: 4px;
    font-size: 0.54rem;
  }

  .calendar-bar.is-gacha-merged {
    padding-inline: 3px;
  }

  .calendar-bar-thumbnail-frame {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .login-claim {
    font-size: 0.52rem;
  }

  .preview-page,
  .settings-page {
    padding-block: 20px 30px;
  }

  .secondary-command span {
    display: none;
  }

  .secondary-command {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
}

@media (width <= 460px) {
  .resource-summary {
    column-gap: 0;
  }

  .summary-item dt {
    font-size: 0.58rem;
  }

  .summary-item dd {
    font-size: 0.88rem;
  }

  .summary-item.is-compound dd strong {
    font-size: 0.82rem;
  }

  .workspace {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .side-rail {
    grid-auto-rows: 56px;
    padding-inline: 4px;
  }

  .side-rail button span {
    font-size: 0.59rem;
  }

  .calendar-toolbar {
    grid-template:
      "month month" var(--page-top-row-height)
      "projection updated" 32px
      / minmax(84px, 0.7fr) minmax(0, 1.3fr);
  }

  .calendar-projection-state,
  .calendar-updated-at {
    font-size: 0.56rem;
  }

  .month-controls {
    grid-template-columns: 32px minmax(86px, auto) 32px;
    gap: 4px;
  }

  .month-controls,
  .month-controls strong,
  .icon-button {
    height: 32px;
  }

  .icon-button {
    width: 32px;
  }

  .calendar-weekdays span {
    font-size: 0.58rem;
  }

  .calendar-day time {
    font-size: 0.58rem;
  }

  .announcement-card {
    padding: 20px;
  }
}

@media (height <= 650px) and (width >= 500px) {
  .setup-depth {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .announcement-card {
    padding-block: 18px;
  }

  .announcement-copy {
    padding-block: 14px;
  }

  .announcement-copy p:not(:first-child) {
    margin-top: 12px;
    line-height: 1.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
