/* =====================================================================
   APP WINDOW CONTENT – modern, calm, readable.
   "What is Matcha?" and "Buy Matcha", the gel buttons and the toast.
   ===================================================================== */
.app {
  width: min(760px, calc(100vw - 24px));
  height: min(540px, calc(100dvh - var(--taskbar-h) - 24px));
}

.app--buy {
  width: min(700px, calc(100vw - 24px));
  height: min(590px, calc(100dvh - var(--taskbar-h) - 24px));
}

/* ---------------------------------------------------------------------
   App 01 – What is Matcha?: sidebar + panels
   --------------------------------------------------------------------- */
.learn {
  display: flex;
  height: 100%;
}

.learn__nav {
  flex: none;
  width: 188px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--matcha-100);
  border-right: 1px solid var(--line-panel);
}

.learn__navtitle {
  font-size: var(--fs-12);
  color: var(--matcha-700);
  padding: 4px 10px 8px;
  font-weight: 700;
}

.tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-medium);
  background: none;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--matcha-900);
}

.tab svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: var(--matcha-700);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab:hover {
  background: var(--overlay-white-70);
}

.tab[aria-selected="true"] {
  background: var(--paper);
  border-color: var(--line-tab-selected);
  font-weight: 700;
  box-shadow: var(--shadow-tab);
}

.learn__main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 28px 32px 32px;
}

.panel[hidden] {
  display: none;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: var(--fs-26);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.panel .lede {
  margin: 0 0 22px;
  font-size: var(--fs-15-5);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 60ch;
}

.panel p {
  line-height: 1.7;
}

/* production steps – a real sequence, so numbered */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  counter-reset: s;
}

.steps li {
  counter-increment: s;
  padding: 14px 12px;
  border-radius: var(--radius-card);
  background: var(--matcha-100);
  font-size: var(--fs-13-5);
  line-height: 1.5;
}

.steps li::before {
  content: counter(s);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-bottom: 8px;
  border-radius: var(--radius-round);
  background: var(--matcha-500);
  color: var(--white);
  font-weight: 800;
  font-size: var(--fs-13);
}

.steps strong {
  display: block;
  font-size: var(--fs-14-5);
  margin-bottom: 2px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fact {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
}

.fact svg {
  width: 36px;
  height: 36px;
  flex: none;
}

.fact h3 {
  margin: 0 0 2px;
  font-size: var(--fs-15);
}

.fact p {
  margin: 0;
  font-size: var(--fs-13-5);
  line-height: 1.55;
  color: var(--ink-soft);
}

.note {
  margin: 16px 0 0;
  font-size: var(--fs-12);
  color: var(--text-muted);
}

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

.type {
  padding: 16px 14px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.type__swatch {
  height: 38px;
  border-radius: var(--radius-medium);
}

.type__swatch--ceremonial {
  background: var(--swatch-ceremonial);
}

.type__swatch--premium {
  background: var(--swatch-premium);
}

.type__swatch--culinary {
  background: var(--swatch-culinary);
}

.type h3 {
  margin: 4px 0 0;
  font-size: var(--fs-16);
}

.type p {
  margin: 0;
  font-size: var(--fs-13-5);
  line-height: 1.55;
  color: var(--ink-soft);
}

.type dl {
  margin: 6px 0 0;
  font-size: var(--fs-12-5);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
}

.type dt {
  color: var(--text-muted);
}

.type dd {
  margin: 0;
  font-weight: 700;
}

.cta-card {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius-panel);
  background: var(--matcha-100);
}

.cta-card svg {
  width: 120px;
  height: 120px;
  flex: none;
}

.cta-card h2 {
  margin-bottom: 6px;
}

.cta-card p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------
   Buttons – yellow gel, reserved for the primary action
   --------------------------------------------------------------------- */
.gel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--yolk-dark);
  font-family: var(--content-font);
  font-weight: 800;
  font-size: var(--fs-15-5);
  color: var(--text-on-yolk);
  background: var(--gel-cta);
  box-shadow: var(--shadow-gel-btn);
  transition: filter var(--dur-press-filter) ease, transform var(--dur-press) ease;
}

.gel-btn:hover {
  filter: brightness(1.05) saturate(1.05);
}

.gel-btn:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-gel-btn-pressed);
}

.gel-btn--xl {
  min-height: 58px;
  padding: 0 34px;
  font-size: var(--fs-18);
  width: 100%;
}

/* ---------------------------------------------------------------------
   App 02 – Buy Matcha
   --------------------------------------------------------------------- */
.buy {
  display: flex;
  height: 100%;
}

/* PRODUCT_PHOTO (provisional): assets/img/matcha_provisional.webp */
.buy__photo {
  flex: 0 0 44%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-photo);
  border-right: 1px solid var(--line-panel);
}

.buy__photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 60%;   /* keep the spoon in view when cropped */
}

.buy__main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 28px 30px 18px;
}

.buy__origin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-13);
  color: var(--matcha-700);
  font-weight: 700;
  margin-bottom: 12px;
}

/* the red origin dot */
.buy__origin i {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-round);
  background: var(--hinomaru);
  display: inline-block;
}

.buy h2 {
  margin: 0 0 12px;
  font-size: var(--fs-buy-title);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}

.buy__desc {
  margin: 0 0 20px;
  font-size: var(--fs-15-5);
  line-height: 1.7;
  color: var(--ink-soft);
}

.buy__points {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--fs-14);
}

.buy__points li {
  display: flex;
  gap: 10px;
  align-items: center;
}

.buy__points svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: var(--matcha-500);
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.buy__fine {
  margin: 10px 0 0;
  font-size: var(--fs-12-5);
  color: var(--text-muted);
  text-align: center;
}

/* KINTI LABS partner credit – deliberately small */
.partner {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;   /* clear space: half the 24px logo height */
  font-family: var(--chrome-font);
  font-size: var(--fs-11-5);
  color: var(--text-partner);
}

/* KL_logo_extended_light.svg – 24px is the extended logo minimum */
.partner img {
  height: 24px;
  width: auto;
  display: block;
}

/* ---------------------------------------------------------------------
   Toast – classic yellow balloon notice
   --------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translate(-50%, 20px);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: var(--radius-toast);
  font-family: var(--chrome-font);
  font-size: var(--fs-13);
  background: var(--toast-bg);
  color: var(--text-toast);
  border: 1px solid var(--toast-line);
  box-shadow: var(--shadow-toast);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-toast) ease, transform var(--dur-toast) ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--tray {
  left: auto;
  right: 10px;
  transform: translateY(12px);
}

.toast--tray.is-on {
  transform: translateY(0);
}

.toast svg {
  width: 18px;
  height: 18px;
  flex: none;
}
