/* Tasting Notes お客様画面（C0 一覧 / C1・C2 詳細）。
   見た目の正: docs/handoff/ui/ListIpad.html・ListPhone.html・Customer.html・CustomerPhone.html
   トークンは base.css（--paper/--paper-2/--hair/--ink/--ink-2/--wine/--wine-2/--font-sans/--font-num）。
   ルール: 白一色・影やグラデーションなし・字間 .06em 以下・最小 12px・数字（ヴィンテージ/価格）だけ Noto Serif JP。 */

html, body { background: var(--paper); }
body { letter-spacing: .02em; }
a { text-decoration: none; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ===== 共通: ヘッダー ===== */
.tn-head { display: flex; justify-content: space-between; align-items: center; }
.tn-head .logo { height: 24px; width: auto; display: block; }
.tn-head .kicker { font-size: 12px; letter-spacing: .06em; color: var(--ink-2); }

/* ===== 共通: チップ ===== */
.chip { display: inline-flex; align-items: center; font-size: 12px; letter-spacing: .06em; padding: 5px 10px; border-radius: 980px; background: var(--paper-2); color: var(--ink); line-height: 1.4; white-space: nowrap; }
.chip-btn { appearance: none; -webkit-appearance: none; margin: 0; border: 0; cursor: pointer; height: 32px; padding: 0 14px; border-radius: 980px; background: var(--paper-2); color: var(--ink); font-size: 12px; letter-spacing: .06em; font-family: inherit; flex: 0 0 auto; line-height: 1; }
.chip-btn[aria-pressed="true"] { background: var(--wine); color: #F6F1EA; }
.chip-btn:focus-visible, .seg-btn:focus-visible, .sort-select:focus-visible { outline: 2px solid var(--wine-2); outline-offset: 2px; }
.search:focus-within { border-color: var(--wine); }
.search input:focus { outline: 0; }

/* ===== 共通: アバター ===== */
.avatar { border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; background: var(--paper-2); color: var(--wine); font-family: var(--font-sans); font-size: 12px; line-height: 1; }
.avatar.latin { font-family: var(--font-num); font-variant-numeric: lining-nums; font-weight: 500; font-size: 13px; }
.avatar.lead { background: var(--wine); color: #F6F1EA; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== 共通: 数字 ===== */
.vintage { font-family: var(--font-num); font-variant-numeric: lining-nums; font-weight: 500; line-height: 1; color: var(--wine); }
.price { font-family: var(--font-num); font-variant-numeric: lining-nums; font-weight: 500; line-height: 1; color: var(--ink); }

/* =====================================================================
   C0 一覧（index.html）
   ===================================================================== */
.list-page { min-height: 100vh; padding: 48px 24px 40px; display: flex; flex-direction: column; color: var(--ink); }
.list-title { margin: 20px 0 0; font-weight: 500; font-size: 24px; line-height: 1.3; letter-spacing: .04em; color: var(--ink); }
.list-sub { margin-top: 4px; font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
.title-row { display: flex; flex-direction: column; }

.search { margin-top: 16px; height: 44px; background: var(--paper); border: 1px solid var(--hair); display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.search label { display: flex; align-items: center; flex: 0 0 auto; margin: 0; }
.search input { flex: 1 1 auto; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); font-family: inherit; letter-spacing: .02em; }
.search input::placeholder { color: var(--ink-2); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search .clear { appearance: none; border: 0; background: transparent; padding: 0 2px; cursor: pointer; color: var(--ink-2); font-size: 12px; letter-spacing: .06em; display: none; }
.search.has-value .clear { display: inline-block; }

.tag-row { margin-top: 14px; display: flex; gap: 8px; white-space: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.tag-row::-webkit-scrollbar { display: none; }

.control-row { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.seg { display: flex; gap: 2px; }
.seg-btn { appearance: none; -webkit-appearance: none; margin: 0; border: 0; background: transparent; cursor: pointer; padding: 6px 8px; font-size: 12px; letter-spacing: .06em; color: var(--ink-2); font-family: inherit; border-bottom: 1px solid transparent; line-height: 1.4; }
.seg-btn[aria-pressed="true"] { color: var(--wine); border-bottom-color: var(--wine); }
.sort { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .06em; color: var(--ink-2); }
.sort-select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--ink); font-size: 12px; letter-spacing: .06em; font-family: inherit; padding: 6px 18px 6px 0; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A6E66' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; }

.grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--hair); border-radius: 0; padding: 14px; color: var(--ink); min-height: 0; min-width: 0; }
a.card:active { background: #FBF9F6; }
.card-top { display: flex; flex-direction: column; min-width: 0; }
.card-photo { height: 90px; display: flex; align-items: center; justify-content: center; }
.card-photo img { height: 90px; width: auto; max-width: 100%; display: block; object-fit: contain; }
.card-body { display: flex; flex-direction: column; min-width: 0; }
.card .vintage { margin-top: 10px; font-size: 18px; }
.card .name { margin-top: 5px; font-weight: 500; font-size: 13px; line-height: 1.4; letter-spacing: .02em; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .producer { margin-top: 2px; font-size: 12px; line-height: 1.4; letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .price-row { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; }
.card .price { font-size: 14px; }
.card .stock { font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.card-foot .avatar { width: 24px; height: 24px; }
.card .comment { display: none; }
.card-tags { display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.card-tags .chip { padding: 4px 10px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; }
.card-tags .chip:nth-child(n+2) { display: none; }

.list-foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .06em; color: var(--ink-2); flex-wrap: wrap; }

.empty { grid-column: 1 / -1; padding: 64px 16px; text-align: center; color: var(--ink-2); font-size: 14px; line-height: 1.8; letter-spacing: .04em; }
.empty .reset { appearance: none; border: 1px solid var(--hair); background: var(--paper); color: var(--ink); font-size: 12px; letter-spacing: .06em; padding: 8px 16px; margin-top: 16px; cursor: pointer; font-family: inherit; }

/* スケルトン（読込中） */
.skel .ph { background: var(--paper-2); border-radius: 2px; }
.skel { animation: tn-pulse 1.4s ease-in-out infinite; }
@keyframes tn-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ---- iPad 横（1024px〜）＝ ListIpad.html ---- */
@media (min-width: 1024px) {
  .list-page { padding: 32px 48px 28px; }
  .tn-head .logo { height: 34px; }
  .title-row { margin-top: 22px; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 32px; }
  .title-group { display: flex; align-items: baseline; gap: 16px; }
  .list-title { margin: 0; font-size: 28px; }
  .list-sub { margin-top: 0; }
  .search { margin-top: 0; flex: 0 0 420px; padding: 0 16px; }
  .tag-row { margin-top: 20px; }
  .control-row { margin-top: 12px; }
  .grid { margin-top: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .card { padding: 20px; }
  .card-top { flex-direction: row; gap: 16px; align-items: flex-start; }
  .card-photo { flex: 0 0 56px; height: 120px; }
  .card-photo img { height: 120px; }
  .card-body { flex: 1 1 auto; height: 120px; }
  .card .vintage { margin-top: 0; font-size: 22px; }
  .card .name { margin-top: 8px; font-size: 15px; }
  .card .producer { margin-top: 4px; }
  .card .price-row { margin-top: auto; }
  .card .price { font-size: 16px; }
  .card .comment { display: flex; margin-top: auto; padding-top: 14px; align-items: center; gap: 8px; min-width: 0; }
  .card .comment .avatar { width: 24px; height: 24px; }
  .card .comment .text { flex: 1 1 auto; min-width: 0; font-size: 12px; line-height: 1.4; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card-foot { margin-top: 10px; padding-top: 0; }
  .card-foot .avatar { display: none; }
  .card-tags { flex-wrap: wrap; max-height: 56px; }
  .card-tags .chip { padding: 5px 10px; letter-spacing: .06em; }
  .card-tags .chip:nth-child(n+2) { display: inline-flex; }
  .list-foot { margin-top: 16px; }
}
@media (min-width: 700px) and (max-width: 1023px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =====================================================================
   C1 / C2 詳細（w.html）
   ===================================================================== */
.detail { min-height: 100vh; display: flex; flex-direction: column; color: var(--ink); }
.d-hero { background: var(--paper); border-bottom: 1px solid var(--hair); padding: 48px 20px 22px; }
.d-hero .back { display: none; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .06em; color: var(--ink-2); } /* スマホはロゴ＋最下部リンクで戻る */
.d-hero .tn-head .logo { height: 20px; }
.d-product { display: flex; gap: 18px; align-items: center; margin-top: 22px; }
.d-photo { flex: 0 0 96px; height: 190px; display: flex; align-items: center; justify-content: center; }
.d-photo img { height: 190px; width: auto; max-width: 96px; display: block; object-fit: contain; }
.d-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.d-info .vintage { font-size: 44px; line-height: .9; letter-spacing: .01em; }
.d-info .name { margin-top: 10px; font-weight: 500; font-size: 18px; line-height: 1.3; letter-spacing: .02em; color: var(--ink); overflow-wrap: anywhere; }
.d-info .producer-orig { margin-top: 6px; font-size: 12px; letter-spacing: .06em; color: var(--ink); text-transform: uppercase; }
.d-info .producer-kana { margin-top: 3px; font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
.d-info .meta { margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.d-info .price-row { margin-top: 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.d-info .price { font-size: 26px; }
.d-info .price-note { font-size: 12px; letter-spacing: .06em; color: var(--ink-2); }

.d-main { display: flex; flex-direction: column; }
.d-main .tn-head { display: none; }
.d-note { padding: 24px 20px 0; display: flex; flex-direction: column; gap: 14px; }
.d-somm { display: flex; align-items: center; gap: 12px; min-width: 0; }
.d-somm .avatar { width: 44px; height: 44px; font-size: 18px; font-weight: 500; }
.d-somm .avatar.latin { font-size: 18px; }
.d-somm .lines { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.d-somm .who { font-size: 14px; letter-spacing: .06em; color: var(--ink); }
.d-somm .who .sep { color: var(--ink-2); }
.d-somm .when { font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
.d-body { margin: 0; font-weight: 400; font-size: 17px; line-height: 1.75; letter-spacing: .02em; color: var(--ink); }
.d-struct { font-size: 12px; line-height: 1.9; letter-spacing: .02em; color: var(--ink-2); }
.d-struct .row { display: block; }
.d-struct .k { margin-right: .75em; }
.d-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.d-tags .chip { letter-spacing: .04em; }

.d-axes { margin: 22px 20px 0; padding-top: 18px; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 10px; }
.d-label { font-size: 12px; letter-spacing: .06em; color: var(--ink-2); }
.axis { display: flex; flex-direction: column; gap: 4px; }
.axis .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.axis .track { position: relative; height: 2px; background: var(--hair); }
.axis .dot { position: absolute; top: -4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--wine-2); }

.d-palate { margin: 20px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.bars { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 9px 10px; align-items: center; font-size: 12px; color: var(--ink); }
.bars .track { height: 3px; background: var(--hair); }
.bars .fill { height: 3px; background: var(--wine-2); }

.d-facts { margin: 22px 20px 0; padding-top: 16px; border-top: 1px solid var(--hair); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fact { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fact .v { font-size: 14.5px; color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }

.d-others { margin: 20px 20px 0; display: flex; flex-direction: column; }
.other { padding-top: 14px; border-top: 1px solid var(--hair); display: flex; align-items: flex-start; gap: 10px; }
.other + .other { margin-top: 14px; }
.other .avatar { width: 32px; height: 32px; color: var(--ink); font-size: 14px; }
.other .avatar.latin { font-size: 16px; }
.other .lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.other .who { font-size: 12px; letter-spacing: .06em; color: var(--ink-2); }
.other .text { font-size: 13px; line-height: 1.5; color: var(--ink); }

.d-foot { padding: 22px 20px 32px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.d-foot .logo-s { height: 16px; width: auto; display: block; opacity: .8; }
.d-foot .ids { font-size: 12px; letter-spacing: .06em; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; line-height: 1.6; }
.d-foot .qr-wrap { display: none; }

/* 未公開・エラー */
.d-missing { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; gap: 18px; }
.d-missing .logo { height: 24px; width: auto; }
.d-missing h1 { margin: 24px 0 0; font-weight: 500; font-size: 18px; letter-spacing: .04em; color: var(--ink); line-height: 1.6; }
.d-missing p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.8; letter-spacing: .02em; }
.d-missing .back { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .06em; color: var(--wine); border: 1px solid var(--hair); padding: 10px 18px; margin-top: 8px; }

/* ---- iPad 横（1024px〜）＝ Customer.html ---- */
@media (min-width: 1024px) {
  .detail { flex-direction: row; align-items: stretch; }
  .d-hero { flex: 0 0 372px; border-bottom: 0; border-right: 1px solid var(--hair); padding: 40px 40px 36px; display: flex; flex-direction: column; align-items: flex-start; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .d-hero .tn-head { display: none; }
  .d-hero .back { display: inline-flex; }
  .d-product { flex-direction: column; align-items: flex-start; gap: 0; margin-top: 0; flex: 1 1 auto; min-height: 0; width: 100%; }
  .d-photo { align-self: center; margin-top: 22px; flex: 0 0 auto; height: 260px; }
  .d-photo img { height: 260px; max-width: 160px; }
  .d-info { flex: 1 1 auto; width: 100%; }
  .d-info .vintage { margin-top: 26px; font-size: 64px; }
  .d-info .name { margin-top: 14px; font-size: 25px; letter-spacing: .03em; }
  .d-info .producer-orig { margin-top: 10px; }
  .d-info .meta { margin-top: 18px; gap: 7px; line-height: 1.5; letter-spacing: .02em; }
  .d-info .price-row { margin-top: auto; gap: 12px; }
  .d-info .price { font-size: 36px; }

  .d-main { flex: 1 1 auto; min-width: 0; padding: 36px 48px 30px; gap: 26px; }
  .d-main .tn-head { display: flex; }
  .d-main .tn-head .logo { height: 36px; }
  .d-note { padding: 0; gap: 26px; }
  .d-note .d-somm { display: none; }
  .d-body { margin: 6px 0 0; font-size: 23px; line-height: 1.7; }
  .d-struct { font-size: 13px; letter-spacing: .03em; }
  .d-struct .row { display: inline; }
  .d-struct .row + .row::before { content: "　／　"; }
  .d-tags { gap: 8px; }
  .d-tags .chip { letter-spacing: .06em; padding: 6px 12px; }

  .d-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
  .d-axes { margin: 0; padding-top: 0; border-top: 0; gap: 18px; }
  .axis { gap: 6px; }
  .d-palate { margin: 0; gap: 14px; }
  .bars { grid-template-columns: 72px minmax(0, 1fr); gap: 11px 12px; }

  .d-facts { margin: 0; padding-top: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .fact { gap: 6px; }
  .fact .v { font-size: 17px; }

  .d-others { margin: 0; }
  .other .avatar { width: 36px; height: 36px; }

  .d-foot { margin-top: auto; padding: 16px 0 0; border-top: 1px solid var(--hair); align-items: center; gap: 24px; }
  .d-foot .logo-s, .d-foot .ids-phone { display: none; }
  .d-foot .lead-somm { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
  .d-foot .lead-somm .avatar { width: 52px; height: 52px; font-size: 22px; font-weight: 500; }
  .d-foot .lead-somm .avatar.latin { font-size: 22px; }
  .d-foot .lead-somm .lines { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .d-foot .lead-somm .who { font-size: 15px; letter-spacing: .06em; color: var(--ink); }
  .d-foot .lead-somm .who .sep { color: var(--ink-2); }
  .d-foot .lead-somm .when { font-size: 12px; letter-spacing: .06em; color: var(--ink-2); }
  .d-foot .qr-wrap { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
  .d-foot .qr-text { font-size: 12px; letter-spacing: .06em; color: var(--ink-2); text-align: right; line-height: 1.6; white-space: nowrap; }
  .d-foot .qr-box { width: 64px; height: 64px; background: var(--paper); display: flex; align-items: center; justify-content: center; flex: 0 0 64px; }
  .d-foot .qr-box svg, .d-foot .qr-box canvas { width: 64px; height: 64px; display: block; }
}
@media (max-width: 1023px) {
  .d-foot .lead-somm { display: none; }
  .d-foot .ids-phone { display: block; }
}
