:root {
  color-scheme: light;
  font-family:
    "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "PingFang TC",
    "Microsoft JhengHei", system-ui, sans-serif;
  color: #10191f;
  background: #fffdf8;
  font-synthesis: none;
  --ink: #10191f;
  --muted: #5d6870;
  --paper: #fffdf8;
  --white: #fff;
  --line: #10191f;
  --green: #20c779;
  --green-dark: #08704b;
  --sea: #0a75b8;
  --sea-dark: #03466f;
  --coral: #ff5d45;
  --yellow: #ffc91a;
  --pink: #f55ca6;
  --cyan: #10dce4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 12px;
  border-bottom: 1px solid #2ac173;
  background: #2ac173;
  color: white;
}

.wordmark {
  display: flex;
  flex: none;
  align-items: center;
}

.site-logo {
  display: block;
  width: 164px;
  height: 32px;
  object-fit: contain;
}

.header-page-label {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 2px 9px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.header-page-label span:first-child {
  font-weight: 850;
}

main {
  overflow: hidden;
}

.hero-shell {
  position: relative;
  padding: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 64px);
  border-bottom: 3px solid var(--ink);
  background: var(--green);
}

.hero-shell::before,
.hero-shell::after {
  position: absolute;
  width: 110px;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: 60% 40% 60% 40%;
  background: var(--yellow);
  content: "";
}

.hero-shell::before {
  top: 20%;
  left: -56px;
  rotate: -12deg;
}

.hero-shell::after {
  right: -48px;
  bottom: 15%;
  background: var(--pink);
  rotate: 18deg;
}

.hero-visual {
  position: relative;
  z-index: 2;
  width: min(100%, 260px);
  margin: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-copy {
  position: relative;
  z-index: 3;
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

h1 {
  margin: 0;
  line-height: 1.05;
}

h1 span {
  display: block;
}

h1 span:first-child {
  max-width: 13em;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 950;
  letter-spacing: -0.06em;
}

h1 span:not(:first-child) {
  margin-top: 5px;
  font-size: clamp(15px, 1.7vw, 21px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

h1 span:nth-child(2) {
  margin-top: 14px;
  color: white;
  text-shadow: 2px 2px 0 var(--sea-dark);
}

.page-content {
  display: flex;
  width: min(1180px, calc(100% - 32px));
  flex-direction: column;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 72px) 0;
}

body[data-mode="lookup"] .lookup {
  order: -1;
  margin-top: 0;
  margin-bottom: 24px;
}

body[data-mode="results"] .lookup {
  margin-top: 0;
  margin-bottom: 16px;
}

.status-panel {
  display: grid;
  align-items: start;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--yellow);
  box-shadow: 4px 5px 0 var(--ink);
}

.status-panel__dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgb(255 93 69 / 55%);
  animation: pulse 1.3s ease-out infinite;
}

.status-panel[data-state="ready"] .status-panel__dot {
  animation: none;
  background: var(--green);
}

.status-panel[data-state="error"] {
  background: #ffe0da;
}

.status-panel[data-state="error"] .status-panel__dot {
  animation: none;
  background: var(--coral);
}

.status-panel p {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.status-line,
.language-line,
.meta-language-line {
  display: block;
}

.status-line + .status-line,
.language-line + .language-line,
.meta-language-line + .meta-language-line {
  margin-top: 2px;
}

.session-grid {
  display: grid;
  width: min(100%, 760px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.session-navigator {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.session-navigator button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 2px 3px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
  transition: box-shadow 150ms ease, translate 150ms ease;
}

.session-navigator button:last-child {
  text-align: right;
}

.session-navigator .session-navigator__current {
  justify-content: center;
  background: var(--yellow);
  text-align: center;
}

.session-navigator button > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.session-navigator b {
  font-size: 15px;
  line-height: 1.2;
}

.session-navigator small {
  font-size: 8px;
  line-height: 1.25;
}

.session-navigator i {
  flex: none;
  font-size: 22px;
  font-style: normal;
}

.session-navigator button:hover:not(:disabled) {
  box-shadow: 4px 5px 0 var(--ink);
  translate: 0 -2px;
}

.session-navigator button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.session-navigator button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.35;
}

.session-navigator .session-navigator__current:disabled {
  opacity: 1;
}

.session-slot {
  min-width: 0;
}

.session-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: clamp(20px, 3.5vw, 34px);
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 8px 9px 0 var(--ink);
  text-decoration: none;
  transition: translate 160ms ease, box-shadow 160ms ease;
}

.session-card.is-selected {
  background: #fff8dc;
}

.session-card:hover,
.session-card:focus-visible {
  outline: none;
  box-shadow: 4px 5px 0 var(--ink);
  translate: 4px 4px;
}

.session-card__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.session-card__status-tag {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.session-card__status-tag::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.session-card[data-status="selected"] .session-card__status-tag {
  color: var(--coral);
}

.session-card__label .language-line {
  display: inline;
}

.session-card__label .language-line + .language-line {
  margin-top: 0;
}

.session-card__label .language-line:not(:last-child)::after {
  color: #9aa29f;
  content: " ·";
}

.session-card__title {
  margin: 16px 0 28px;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.22;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.session-card__meta {
  display: grid;
  gap: 0;
  margin: 0 0 28px;
  border-top: 2px solid var(--ink);
}

.session-card__meta div {
  display: grid;
  grid-template-columns: minmax(108px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #cbd1ce;
}

.session-card__meta dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.session-card__meta dd {
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.session-card__speaker dd {
  font-size: 18px;
}

.session-card__meta dd.is-missing {
  color: #8a3b2f;
  font-size: 11px;
  font-weight: 700;
}

.session-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: var(--coral);
  box-shadow: 3px 4px 0 var(--ink);
  color: white;
}

.session-card__action > span {
  display: grid;
  gap: 2px;
}

.session-card__action b {
  font-size: 19px;
}

.session-card__action small {
  font-size: 10px;
  font-weight: 800;
}

.session-card__action i {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 22px;
  font-style: normal;
}

.lookup {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 24px 34px;
  align-items: start;
  margin-top: 34px;
  padding: clamp(22px, 4vw, 34px);
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #dff7eb;
  box-shadow: 7px 8px 0 var(--ink);
}

.lookup h2 {
  margin: 0;
}

.lookup h2 span {
  display: block;
}

.lookup h2 {
  font-size: 16px;
  line-height: 1.35;
}

.lookup h2 span:first-child {
  margin-bottom: 5px;
  font-size: 24px;
}

.lookup__form label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 900;
}

.program-picker {
  display: grid;
  gap: 7px;
}

.picker-step h3,
.session-id-lookup h3 {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.picker-step h3 b {
  color: var(--ink);
  font-size: 13px;
}

.choice-list {
  display: grid;
  max-height: 340px;
  gap: 8px;
  padding: 3px 7px 6px 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--green-dark) transparent;
}

.choice-button {
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: white;
  box-shadow: 2px 3px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-align: left;
  transition: background 140ms ease, box-shadow 140ms ease, translate 140ms ease;
}

.choice-button:hover,
.choice-button:focus-visible {
  background: #fff8dc;
  box-shadow: 4px 5px 0 var(--ink);
  outline: none;
  translate: 0 -1px;
}

.choice-button:focus-visible,
.picker-back:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
}

.choice-button--session {
  display: grid;
  gap: 3px;
}

.choice-button--session b {
  font-size: 13px;
}

.choice-session__meta {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.choice-list__message {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.picker-back {
  min-height: auto;
  margin-bottom: 9px;
  padding: 6px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
}

.selected-track-name {
  margin: -2px 0 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--yellow);
  font-size: 11px;
  font-weight: 900;
}

.session-id-lookup {
  padding-top: 14px;
  border-top: 1.5px solid rgb(16 25 31 / 30%);
  grid-column: 1 / -1;
}

.lookup__controls {
  display: flex;
  gap: 10px;
}

.lookup input,
.lookup__form button {
  min-height: 54px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  font: inherit;
}

.lookup input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
  background: white;
  color: var(--ink);
  font-weight: 750;
}

.lookup input:focus,
.lookup__form button:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
}

.lookup__form button {
  display: grid;
  min-width: 92px;
  align-content: center;
  padding: 7px 14px;
  background: var(--coral);
  box-shadow: 3px 4px 0 var(--ink);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.lookup__form button:hover {
  box-shadow: 1px 2px 0 var(--ink);
  translate: 2px 2px;
}

.lookup__form button:disabled {
  box-shadow: 2px 2px 0 var(--ink);
  cursor: wait;
  filter: grayscale(0.35);
  opacity: 0.65;
  translate: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 64px);
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: 11px;
  line-height: 1.5;
}

footer p {
  margin: 0;
}

footer a {
  font-weight: 800;
  text-underline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgb(255 93 69 / 0%);
  }
}

@media (max-width: 820px) {
  .lookup {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 56px;
    gap: 10px;
    padding: 4px 10px;
  }

  .site-logo {
    width: 136px;
    height: 28px;
  }

  .header-page-label {
    margin-left: auto;
    max-width: 220px;
    gap: 1px 6px;
    font-size: 9px;
  }

  .hero-shell {
    padding: 14px 10px;
  }

  .hero-shell::before,
  .hero-shell::after {
    width: 54px;
    height: 12px;
  }

  .hero-visual {
    width: min(100%, 112px);
  }

  .hero-copy {
    width: min(100%, 42rem);
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 10px;
  }

  h1 span:first-child {
    max-width: none;
    font-size: 25px;
    letter-spacing: -0.05em;
  }

  h1 span:not(:first-child) {
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: -0.02em;
  }

  h1 span:nth-child(2) {
    margin-top: 5px;
    text-shadow: 1px 1px 0 var(--sea-dark);
  }

  .session-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .session-navigator {
    gap: 6px;
  }

  .session-navigator button {
    padding: 7px;
    gap: 5px;
    border-radius: 11px;
  }

  .session-navigator b {
    font-size: 11px;
  }

  .session-navigator small {
    font-size: 6px;
  }

  .session-navigator i {
    font-size: 17px;
  }

  .page-content {
    width: min(100% - 16px, 42rem);
    padding: 16px 0 24px;
  }

  .status-panel {
    gap: 8px;
    margin-bottom: 12px;
    padding: 9px 10px;
    border-width: 2px;
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .status-panel p {
    font-size: 9px;
    line-height: 1.25;
  }

  .status-panel__dot {
    width: 9px;
    height: 9px;
    margin-top: 2px;
  }

  .session-card {
    padding: 14px;
    border-width: 2px;
    border-radius: 16px;
    box-shadow: 4px 5px 0 var(--ink);
  }

  .session-card__label {
    gap: 1px 5px;
    font-size: 7.5px;
  }

  .session-card__status-tag {
    gap: 4px;
    font-size: 6.5px;
  }

  .session-card__status-tag::before {
    width: 5px;
    height: 5px;
  }

  .session-card__title {
    margin: 9px 0 13px;
    font-size: 20px;
    line-height: 1.2;
  }

  .session-card__meta {
    margin-bottom: 11px;
    border-top-width: 1.5px;
  }

  .session-card__meta div {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 9px;
    padding: 6px 0;
  }

  .session-card__meta dt {
    font-size: 7.5px;
    line-height: 1.25;
  }

  .session-card__meta dd {
    font-size: 11px;
    line-height: 1.3;
  }

  .session-card__speaker dd {
    font-size: 13px;
  }

  .session-card__action {
    gap: 10px;
    padding: 8px 9px;
    border-width: 1.5px;
    border-radius: 11px;
    box-shadow: 2px 3px 0 var(--ink);
  }

  .session-card__action b {
    font-size: 14px;
  }

  .session-card__action small {
    font-size: 7.5px;
  }

  .session-card__action i {
    width: 34px;
    height: 34px;
    border-width: 1.5px;
    font-size: 17px;
  }

  .lookup {
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
    border-width: 2px;
    border-radius: 14px;
    box-shadow: 4px 5px 0 var(--ink);
  }

  body[data-mode="lookup"] .lookup {
    margin-bottom: 0;
  }

  .lookup h2 {
    font-size: 11px;
    line-height: 1.22;
  }

  .lookup h2 span:first-child {
    margin-bottom: 3px;
    font-size: 18px;
  }

  .program-picker {
    gap: 5px;
  }

  .picker-step h3,
  .session-id-lookup h3 {
    margin-bottom: 6px;
    font-size: 8px;
  }

  .picker-step h3 b {
    font-size: 10px;
  }

  .choice-list {
    max-height: 290px;
    gap: 6px;
    padding: 2px 5px 5px 2px;
  }

  .choice-button {
    min-height: 42px;
    padding: 7px 8px;
    border-width: 1.5px;
    border-radius: 9px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 10px;
  }

  .choice-button--session b {
    font-size: 11px;
  }

  .choice-session__meta {
    font-size: 8px;
  }

  .picker-back {
    margin-bottom: 6px;
    padding: 5px 7px;
    font-size: 8px;
  }

  .selected-track-name {
    margin-bottom: 6px;
    padding: 6px 8px;
    font-size: 9px;
  }

  .session-id-lookup {
    padding-top: 10px;
  }

  .lookup__form label {
    margin-bottom: 4px;
    font-size: 9px;
  }

  .lookup input,
  .lookup__form button {
    min-height: 44px;
    border-width: 1.5px;
    border-radius: 10px;
  }

  .lookup input {
    padding: 8px 10px;
    font-size: 13px;
  }

  .lookup__form button {
    min-width: 78px;
    padding: 5px 9px;
    font-size: 8px;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .site-header {
    min-height: 52px;
    gap: 4px;
    padding: 4px 7px;
  }

  .site-logo {
    width: 126px;
    height: 26px;
  }

  .header-page-label {
    max-width: 205px;
    font-size: 8px;
  }

  .lookup__controls {
    flex-direction: column;
  }

  .lookup__form button {
    grid-template-columns: repeat(4, auto);
    gap: 5px;
    justify-content: center;
  }
}

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