@font-face {
  font-family: "Akatsukiski Wordmark";
  src: url("/fonts/zen-kaku-gothic-wordmark.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@layer reset, site;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, figure { margin: 0; }
  img { display: block; max-width: 100%; }
  a { color: inherit; }
  button, input, select, textarea { font: inherit; }
  button { cursor: pointer; }
  [hidden] { display: none !important; }
}
@layer site {
  :root {
    color-scheme: light;
    --paper: #f6f6f2;
    --ink: #191a18;
    --muted: #54564f;
    --line: #d2d3ca;
    --accent: #ad2929;
    --display: Georgia, 'Times New Roman', serif;
    --body: system-ui, sans-serif;
  }
  body { background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--body); }
  body:has(dialog[open]) { overflow: hidden; }
  .wrap { width: min(100% - 88px, 1300px); margin-inline: auto; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
  .skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 2; padding: .65rem 1rem; background: white; transform: translateY(-180%); }
  .skip-link:focus { transform: none; }
  .site-header, .site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
  .site-header { min-height: 78px; border-bottom: 1px solid var(--line); }
  .brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-family: "Akatsukiski Wordmark", var(--body); font-weight: 500; letter-spacing: -.055em; font-size: 1.45rem; }
  nav { display: flex; align-items: center; gap: clamp(.9rem, 3vw, 2.5rem); }
  nav a, .site-footer > a:not(.brand) { display: inline-flex; gap: .35em; align-items: center; min-height: 44px; font-size: .88rem; text-decoration: none; }
  nav a:hover, .site-footer > a:not(.brand):hover { text-decoration: underline; text-underline-offset: .25em; }
  .hero { display: grid; grid-template-columns: 1fr 1.12fr; gap: clamp(2rem, 5vw, 6rem); align-items: center; padding-block: clamp(1.65rem, 4vw, 3.8rem) clamp(3.6rem, 7vw, 6.4rem); }
  .hero h1 { font: 450 clamp(4rem, 8.4vw, 8.3rem)/.85 var(--display); letter-spacing: -.08em; }
  .hero h1 em { display: block; font-weight: inherit; }
  .hero-copy p { margin-block: 1.7rem 1.5rem; max-width: 33ch; color: var(--muted); }
  .primary { display: inline-flex; width: fit-content; align-items: center; justify-content: space-between; gap: 1.7rem; min-height: 48px; padding: .65rem 1rem; border: 1px solid var(--ink); background: var(--ink); color: white; font-size: .9rem; font-weight: 600; text-decoration: none; }
  .primary:hover { background: #353630; }
  .primary:disabled { cursor: progress; opacity: .72; }
  .hero-art picture { display: block; }
  .hero-art img { width: 100%; height: clamp(360px, 37vw, 530px); object-fit: cover; object-position: center 35%; background: #d9c490; }
  figcaption { display: flex; justify-content: space-between; margin-top: .65rem; font-size: .8rem; color: var(--muted); }
  .collection { border-top: 1px solid var(--line); padding-top: 1.1rem; scroll-margin-top: 1rem; }
  .collection-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding-bottom: 1.45rem; }
  .collection-heading :is(h1, h2), .inquiry-panel h2 { font: 400 clamp(2.15rem, 4vw, 3.6rem)/1.04 var(--display); letter-spacing: -.06em; }
  .collection-heading p { color: var(--muted); font-size: .86rem; white-space: nowrap; }
  .paintings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.3vw, 2.2rem); row-gap: clamp(2rem, 5vw, 4.5rem); }
  .painting-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; color: inherit; }
  .painting-frame { display: block; aspect-ratio: 7 / 10; background: #efefe9; }
  .painting-frame img { width: 100%; height: 100%; object-fit: contain; }
  .painting-caption { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; min-height: 44px; padding-top: .62rem; border-bottom: 1px solid var(--line); }
  .painting-caption strong { font-size: clamp(.95rem, 1.5vw, 1.12rem); letter-spacing: -.035em; }
  .painting-caption span { color: var(--muted); white-space: nowrap; font-size: .77rem; }
  .painting-button:hover .painting-caption, .painting-button:hover .painting-caption span { color: var(--accent); border-color: var(--accent); }
  .site-footer { flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: clamp(3rem, 7vw, 7rem); padding-block: 1rem; }
  #analytics-settings { min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: .88rem; }
  .analytics-options {
    position: fixed;
    z-index: 5;
    inset-inline-end: max(1rem, env(safe-area-inset-right));
    inset-block-end: max(1rem, env(safe-area-inset-bottom));
    width: min(22rem, calc(100% - 2rem));
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: .55rem;
    background: var(--paper);
    box-shadow: 0 .45rem 1.6rem rgb(25 26 24 / .14);
  }
  .analytics-options h2 { font-size: .95rem; font-weight: 650; }
  .analytics-options p { margin-top: .35rem; color: var(--muted); font-size: .86rem; line-height: 1.45; }
  .analytics-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .85rem; }
  .analytics-actions button {
    min-height: 44px;
    padding: .42rem .55rem;
    border: 1px solid #8f9285;
    border-radius: .35rem;
    background: #fdfdfa;
    color: var(--ink);
    font-size: .85rem;
  }
  .analytics-actions button:hover { background: #e8e8e1; }
  body:has(dialog[open]) .analytics-options { visibility: hidden; }
  dialog { padding: 0; border: 0; width: min(790px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); background: var(--paper); color: var(--ink); }
  dialog::backdrop { background: rgb(19 19 17 / .67); }
  .inquiry-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); }
  .inquiry-image { width: 100%; height: 100%; max-height: 660px; object-fit: contain; background: #e8e8e1; }
  .inquiry-panel { position: relative; padding: 3.4rem 1.7rem 1.7rem; }
  .inquiry-panel p { color: var(--muted); margin-block: .7rem 1rem; }
  .close { position: absolute; inset: .35rem .4rem auto auto; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 1.75rem; }
  .close:hover { background: #e5e5df; }
  #inquiry-form {
    --field-paper: #fdfdfa;
    --field-border: #929589;
    --field-focus: #414638;
    --field-radius: .45rem;
    display: grid;
    gap: .9rem;
  }
  #inquiry-form label, .order-types legend { font-size: .85rem; font-weight: 550; }
  #inquiry-form label { display: block; }
  #inquiry-form label span { color: var(--muted); font-weight: 400; }
  #inquiry-form :is(input:not([type="radio"]), textarea) {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: .32rem;
    padding: .55rem .7rem;
    border: 1px solid var(--field-border);
    border-radius: var(--field-radius);
    background: var(--field-paper);
    color: var(--ink);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
  }
  #inquiry-form :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
  #inquiry-form :is(input:not([type="radio"]), textarea):hover:not(:disabled) { border-color: var(--field-focus); }
  #inquiry-form :is(input:not([type="radio"]), textarea):focus-visible,
  #inquiry-form .order-choice:has(input:focus-visible) {
    border-color: var(--field-focus);
    box-shadow: inset 0 0 0 1px var(--field-focus);
    outline: none;
  }
  #inquiry-form textarea { resize: vertical; }
  #inquiry-form .send { width: 100%; border-radius: var(--field-radius); }

  .order-types { min-width: 0; margin: 0; padding: 0; border: 0; }
  .order-types legend { padding: 0; margin-bottom: .32rem; }
  .order-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
  #inquiry-form .order-choice {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 46px;
    padding: .34rem .23rem;
    background: var(--field-paper);
    border: 1px solid var(--field-border);
    border-radius: var(--field-radius);
    font-size: .79rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
  }
  .order-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
  #inquiry-form .order-choice:hover { border-color: var(--field-focus); }
  #inquiry-form .order-choice:has(input:checked) {
    background: #e8ebe2;
    border-color: var(--field-focus);
    font-weight: 650;
  }
  #inquiry-form .order-choice:has(input:disabled) { opacity: .72; cursor: progress; }
  #inquiry-form .order-icon { display: block; width: 1rem; height: 1rem; flex: none; }
  @media (max-width: 440px) {
    #inquiry-form .order-choice { flex-direction: column; gap: .26rem; min-height: 50px; font-size: .74rem; }
  }
  @media (forced-colors: active) {
    #inquiry-form :is(input:not([type="radio"]), textarea):focus-visible,
    #inquiry-form .order-choice:has(input:focus-visible) { outline: 2px solid Highlight; outline-offset: -2px; }
    #inquiry-form .order-choice:has(input:checked) { border-color: Highlight; }
  }
  .form-error { color: var(--accent) !important; margin: 0 !important; }
  #inquiry-success h3 { font-size: 1.25rem; }
  @media (max-width: 780px) {
    .wrap { width: calc(100% - 48px); }
    .hero { gap: 1.6rem; }
    .paintings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) {
    .wrap { width: calc(100% - 32px); }
    .site-header { min-height: 62px; }
    nav { gap: .8rem; }
    nav a { font-size: .8rem; }
    .hero { grid-template-columns: 1fr; padding-top: 2.2rem; }
    .hero h1 { font-size: clamp(3.9rem, 14vw, 5.6rem); }
    .hero-copy p { margin-block: 1rem; }
    .hero-art img { height: clamp(265px, 82vw, 430px); }
    .collection-heading { padding-bottom: .95rem; }
    .painting-caption { flex-wrap: wrap; align-content: start; gap: .1rem .55rem; padding-bottom: .35rem; }
  }
  @media (max-width: 350px) {
    .brand { font-size: 1.22rem; }
  }
}
@layer site {
  .painting-button { text-decoration: none; }
  .hero-link { display: inline-flex; gap: .4em; align-items: center; text-decoration: none; }
  .hero-link:hover { text-decoration: underline; text-underline-offset: .22em; }
  .detail { padding-top: clamp(1rem, 2.5vw, 2.3rem); }
  .return-link { display: inline-flex; align-items: center; gap: .65em; min-height: 44px; color: var(--muted); font-size: .9rem; text-decoration: none; }
  .return-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .24em; }
  .detail-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: clamp(2.5rem, 8vw, 8.2rem); margin-top: .9rem; align-items: start; }
  .detail-art { display: grid; place-items: center; padding: clamp(.75rem, 2.5vw, 2.2rem); background: #ebebe4; }
  .detail-art img { width: auto; height: auto; max-height: 760px; max-width: 100%; object-fit: contain; }
  .detail-copy { padding-block: clamp(1rem, 4vw, 4.5rem); }
  .detail-copy h1 { font: 400 clamp(3.15rem, 6vw, 6.65rem)/.95 var(--display); letter-spacing: -.065em; text-wrap: balance; }
  .detail-description { max-width: 39ch; margin: 1.4rem 0 1.5rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); }
  .detail-videos { margin-top: clamp(2.3rem, 4vw, 4rem); border-top: 1px solid var(--line); padding-top: .85rem; }
  .detail-videos h2 { margin-bottom: .45rem; font: 400 clamp(1.5rem, 2.4vw, 2rem)/1.1 var(--display); letter-spacing: -.04em; }
  .detail-videos ul { margin: 0; padding: 0; list-style: none; }
  .detail-videos a { display: flex; align-items: center; gap: .75rem; min-height: 46px; padding: .5rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: .88rem; }
  .detail-videos a:hover { color: var(--accent); border-color: var(--accent); }
  .video-platform { margin-left: auto; white-space: nowrap; color: var(--muted); font-size: .77rem; }
  @media (max-width: 680px) {
    .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .detail-art img { max-height: 68vh; }
    .detail-copy { padding-block: 0; }
    .detail-copy h1 { text-wrap: wrap; }
    .detail-description { margin-block: .85rem 1.25rem; }
  }
}

@layer site {
  .inquiry-layout { position: relative; }
  .inquiry-heading p { max-width: 38ch; }
  .inquiry-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  @media (max-width: 680px) {
    .inquiry-layout { grid-template-columns: 1fr; }
    .inquiry-panel { padding: 1.15rem 1rem 1rem; }
    .inquiry-image { position: absolute; inset: 1rem auto auto 1rem; width: 60px; height: 86px; object-fit: cover; }
    .inquiry-heading { padding-inline: 76px 2.4rem; min-height: 90px; }
    .inquiry-heading h2 { padding-right: 0; }
    .inquiry-heading p { margin-block: .35rem .9rem; font-size: .86rem; }
  }
  @media (max-width: 375px) {
    .inquiry-fields { grid-template-columns: 1fr; }
  }
}

@layer site {
  .painting-frame { overflow: hidden; }
  .send-indicator { display: grid; place-items: center; width: 1em; height: 1em; }
  .send[data-sending] .send-indicator {
    width: .95rem;
    height: .95rem;
    border: 2px solid rgb(255 255 255 / .45);
    border-top-color: white;
    border-radius: 50%;
    font-size: 0;
  }
  .request-status, .hero-announcement {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .request-check {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    margin-bottom: .8rem;
    border: 1px solid #afbaa4;
    border-radius: 50%;
    background: #e8ede2;
    color: #374b33;
    font-size: 1.25rem;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-copy, .detail-copy { animation: copy-enter 420ms ease-out both; }
    .hero-art, .detail-art { animation: art-enter 540ms cubic-bezier(.22,.61,.36,1) both; }
    dialog[open] { animation: dialog-enter 230ms ease-out both; }
    dialog[open]::backdrop { animation: backdrop-enter 200ms ease-out both; }
    .send[data-sending] .send-indicator { animation: send-spin 700ms linear infinite; }
    #inquiry-success:not([hidden]) { animation: copy-enter 280ms ease-out both; }

    @media (hover: hover) {
      .painting-frame img { transition: transform 340ms cubic-bezier(.22,.61,.36,1); }
      .painting-button:hover img { transform: scale(1.025); }
    }
  }

  @keyframes copy-enter {
    from { opacity: .78; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes art-enter {
    from { transform: translateY(8px) scale(.995); }
    to { transform: translateY(0) scale(1); }
  }
  @keyframes dialog-enter {
    from { opacity: .8; transform: translateY(8px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes backdrop-enter {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes send-spin { to { transform: rotate(1turn); } }
}

@layer site {
  main > .collection:first-child { margin-top: clamp(1.5rem, 4vw, 3.5rem); border-top: 0; }
  .hero-stage { position: relative; }
  .hero-pending { position: absolute; inset: 0; visibility: hidden; }
  .hero-art figcaption { align-items: center; gap: .5rem; }
  .hero-link { min-height: 44px; }
  .hero-controls { display: flex; align-items: center; gap: .15rem; }
  .hero-controls button {
    display: grid;
    place-items: center;
    padding: 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
  }
  .hero-controls button[data-hero-toggle] { font-size: .86rem; }
  .hero-controls button:hover { background: #e8e8e1; }
  .hero-position { white-space: nowrap; font-variant-numeric: tabular-nums; }
  @media (prefers-reduced-motion: no-preference) {
    .hero-enter { animation: hero-slide-in 330ms ease-out; }
  }
  @keyframes hero-slide-in { from { opacity: .72; } to { opacity: 1; } }
}
