:root {
      color-scheme: light;
      --ink: #19291c;
      --muted: #4d5c4f;
      --green: #214d32;
      --background: #eef2eb;
      --line: #c7d3c5;
      font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    }
    * { box-sizing: border-box; }
    body { margin: 0; color: var(--ink); background: var(--background); line-height: 1.65; }
    main {
      width: min(100% - 32px, 680px);
      margin: clamp(16px, 5vw, 52px) auto;
      background: #fff;
      border: 1px solid #dce4d8;
      border-radius: 20px;
      box-shadow: 0 16px 45px #243a2410;
      overflow: hidden;
    }
    .thumbnail { display: block; width: 100%; height: auto; }
    .content { padding: clamp(20px, 5vw, 40px); }
    h1, h2 {
      margin: 0;
      font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
      font-size: 2.25rem;
      font-weight: 600;
      line-height: 1.6;
      letter-spacing: .04em;
      overflow-wrap: anywhere;
    }
    @media (max-width: 600px) { h1, h2 { font-size: 1.875rem; } }
    #application-title { white-space: nowrap; font-size: clamp(0.9rem, 5.2vw, 2.25rem); letter-spacing: 0; }
    form { display: grid; gap: 28px; margin-top: 24px; }
    .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    label, legend { font-size: 1rem; font-weight: 700; }
    .required {
      display: inline-block;
      margin-left: 8px;
      padding: 0 7px;
      border-radius: 4px;
      color: var(--green);
      background: #e4eee3;
      font-size: .8125rem;
      vertical-align: .1em;
    }
    .optional {
      display: inline-block;
      margin-left: 8px;
      padding: 0 7px;
      border-radius: 4px;
      color: var(--muted);
      background: #f2f5ef;
      font-size: .8125rem;
      vertical-align: .1em;
    }
    .optional-note { margin: 0; }
    label { display: block; }
    input, select, button {
      font-family: "Zen Kaku Gothic New", sans-serif;
      font-size: 1.125rem;
      font-weight: 400;
    }
    input, select {
      display: block;
      width: 100%;
      min-width: 0;
      height: 60px;
      margin-top: 6px;
      padding: 16px 18px;
      color: var(--ink);
      background: #f2f5ef;
      border: 1px solid var(--line);
      border-radius: 4px;
    }
    .preferences input, .preferences select { height: 62px; }
    @media (max-width: 390px) {
      .preferences select { padding-left: 8px; }
    }
    select {
      appearance: none;
      padding-right: 28px;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%234d5c4f' stroke-linecap='round' stroke-width='1.5'/%3E%3C/svg%3E");
      background-position: right 10px center;
      background-repeat: no-repeat;
    }
    :focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
    fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
    legend { padding: 0; }
    .preferences { display: grid; gap: 28px; }
    .note { margin: 3px 0 0; color: var(--muted); font-size: .875rem; }
    .visually-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
    }
    button {
      min-height: 56px;
      padding: 10px 16px;
      border: 0;
      border-radius: 4px;
      background: var(--green);
      color: #fff;
      font-size: 1.125rem;
      font-weight: 500;
      letter-spacing: .06em;
      cursor: pointer;
    }
    button:hover { background: #163925; }
    .feedback { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; color: #79291f; background: #fff1eb; }
    [hidden] { display: none !important; }
    .booking-date { margin: 6px 0 14px; font-weight: 700; font-size: 1.12em; }
    /* いま何番目の手順かと、次にLINEがあることを最初から見せる */
    .steps { display: flex; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
    .steps li { flex: 1; padding: 8px 10px; border-radius: 6px; color: var(--muted); background: #f2f5ef; font-size: .875rem; font-weight: 700; line-height: 1.35; }
    .steps li span { display: block; font-size: .6875rem; letter-spacing: .08em; }
    .steps li[aria-current="step"] { color: #fff; background: var(--green); }
    .steps li.done { color: var(--green); background: #e4eee3; }
    #confirmation .steps { margin: 0 0 18px; }
    .facts { margin: 14px 0 0; color: var(--muted); font-size: .875rem; }
    .submit-area { display: grid; gap: 10px; }
    .submit-area .feedback { margin: 0; }
    .before-submit { margin: 0; }
    #confirmation .alert-box { margin: 0 0 18px; padding: 14px 10px 4px; border: 2px solid #d93025; border-radius: 12px; background: #fff4f2; text-align: center; }
    #confirmation .alert { margin: 0 0 6px; font-weight: 800; color: #d93025; font-size: clamp(0.85rem, 4.2vw, 1.2rem); white-space: nowrap; }
    #confirmation .line-lead { margin: 12px 0 12px; font-size: clamp(0.7rem, 3.6vw, 1.25rem); line-height: 1.5; letter-spacing: 0; white-space: nowrap; color: #04813a; outline: none; }
    #confirmation .line-button { margin: 0 0 8px; font-size: clamp(0.8rem, 4.4vw, 1.06rem); padding: 16px 8px; white-space: nowrap; letter-spacing: 0; }
    #confirmation .held { margin: 8px 0 0; font-weight: 700; font-size: clamp(1.25rem, 6.4vw, 1.6rem); line-height: 1.4; }
    #confirmation .held small { display: block; font-size: .875rem; font-weight: 700; color: var(--muted); }
    #confirmation .rank-note { margin: 6px 0 0; font-size: .875rem; font-weight: 700; color: #79291f; }
    #confirmation .after-line { margin: 0 0 12px; font-size: .875rem; color: var(--muted); }
    #confirmation .note { margin-top: 8px; }
    #confirmation .note a { color: var(--green); }
    .checking { padding: 28px 0; text-align: center; color: var(--muted); font-weight: 700; }
    .checking small { display: block; margin-top: 6px; font-size: .8125rem; font-weight: 400; }
    .spinner { display: block; width: 28px; height: 28px; margin: 0 auto 14px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .9s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    @media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
    .line-message { margin: 18px 0 20px; padding: 18px 16px; background: #eef8f1; border: 2px solid #06c755; border-radius: 10px; }
    .line-message .line-title { font-weight: 700; font-size: 1.12em; color: #04813a; margin-bottom: 8px; }
    .line-message p { margin: 0; }
    .line-message p + p { margin-top: 6px; }
    .line-button {
      display: block;
      margin-top: 14px;
      padding: 14px 16px;
      border-radius: 4px;
      background: #06c755;
      color: #fff;
      font-weight: 700;
      text-align: center;
      text-decoration: none;
    }
    .line-button:hover { background: #05a647; }
    .line-message .line-button { width: 100%; max-width: 340px; margin: 14px auto 0; }
    .line-message .line-sub { margin-top: 10px; text-align: center; font-size: .92em; }
  
    .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
    button:disabled { opacity: .6; cursor: progress; }
