:root{
  /* トリガーワーニング新ブランド：セージグリーン＋チケット(黄×黒)。
     ※既存参照を壊さないため、--orange 等の変数名は残し「値だけ」セージに置換 */
  --cream:#cdd8d1; --paper:#fbfdfb; --ink:#2c3a34; --sub:#6d7d75;
  --line:#cbd6cf; --orange:#5c7d6f; --orange-d:#46604f;
  --sage:#5c7d6f; --sage-d:#46604f; --sage-band:#7d9a8c;
  --yellow:#ffcf1a; --tkblack:#161616;
}
*{box-sizing:border-box;}
html,body{margin:0;}
body{
  font-family:"M PLUS Rounded 1c",-apple-system,BlinkMacSystemFont,"Hiragino Maru Gothic ProN","Hiragino Kaku Gothic ProN",sans-serif;
  background:var(--cream); color:var(--ink); line-height:1.6;
  padding:18px 12px 60px;
}
.wrap{max-width:760px;margin:0 auto;}

/* 画面上部の操作バー（印刷では消す） */
.toolbar{max-width:760px;margin:0 auto 14px;display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.btn{font-family:inherit;font-weight:700;border:none;border-radius:12px;padding:12px 18px;font-size:1rem;cursor:pointer;}
.btn-primary{background:var(--orange);color:#fff;}
.btn-primary:active{background:var(--orange-d);}
.btn-ghost{background:#fff;color:var(--ink);border:1.5px solid var(--line);}
/* 会場配布用チケットDL（チケットの黄×黒） */
.btn-ticket{background:var(--yellow);color:var(--tkblack);border:1.5px solid var(--tkblack);}
.btn-ticket:active{background:#e6ba17;}
.hint{font-size:.82rem;color:var(--sub);}

/* シート本体 */
.sheet{
  background:var(--paper); border:1px solid var(--line); border-radius:14px;
  padding:26px 26px 16px; position:relative; box-shadow:0 2px 10px rgba(0,0,0,.05);
}
.sheet-top{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:end;}
/* 見出し：セージのバンド＋チケットロゴ（全幅バンドにするため負マージン） */
.sheet-head{display:flex;align-items:center;gap:16px;background:var(--sage-band);
  margin:-26px -26px 18px;padding:18px 22px;border-radius:14px 14px 0 0;color:#fff;}
.head-txt{flex:1;min-width:0;}
.lead{font-size:.8rem;color:rgba(255,255,255,.92);font-weight:700;}
.sheet-title{font-size:1.7rem;font-weight:800;margin:3px 0 0;letter-spacing:.02em;color:#fff;line-height:1.28;word-break:keep-all;}

/* チケット風ロゴ（Web表示用・デザイナー制作の画像／QRなし） */
.tw-logo{flex:0 0 auto;width:240px;max-width:42vw;height:auto;display:block;
  border-radius:6px;box-shadow:0 2px 7px rgba(0,0,0,.25);}

/* ネタバレ注意バッジ（星型） */
.badge{
  position:absolute;top:18px;right:18px;width:84px;height:84px;
  background:var(--orange);color:#fff;display:flex;flex-direction:column;
  align-items:center;justify-content:center;font-weight:800;line-height:1.15;text-align:center;
  clip-path:polygon(50% 0%,61% 12%,76% 6%,79% 23%,96% 26%,88% 41%,100% 53%,86% 62%,92% 79%,74% 79%,67% 95%,50% 86%,33% 95%,26% 79%,8% 79%,14% 62%,0% 53%,12% 41%,4% 26%,21% 23%,24% 6%,39% 12%);
}
.badge-s{font-size:.62rem;} .badge-l{font-size:1.15rem;}

/* 入力フィールド */
.field{margin:0 0 10px;}
.field-label{font-size:.72rem;color:var(--sub);font-weight:700;margin-bottom:3px;}
.field-input{width:100%;font-family:inherit;font-size:1rem;color:var(--ink);background:#fff;
  border:1px solid var(--line);border-radius:8px;padding:8px 10px;}
textarea.field-input{min-height:74px;resize:vertical;}
.field-value{min-height:1.4em;border-bottom:1px solid var(--line);padding:4px 2px;font-weight:700;}
.field-value.multiline{white-space:pre-wrap;border:1px solid var(--line);border-radius:8px;padding:8px 10px;min-height:60px;font-weight:400;}

/* セクション */
.sheet-sec{margin:16px 0 8px;page-break-inside:avoid;}
.sec-title{font-size:1.05rem;font-weight:800;margin:0 0 8px;}
.sec-note{font-size:.74rem;color:var(--sub);font-weight:600;}
.sec-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 22px;}
.sec-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;padding:4px 0;}
.row-left{flex:1;min-width:0;}
/* 補足は行の下に全幅で置く（どの行でも同じ長さになるように） */
.sec-row>.row-note-edit,.sec-row>.row-note{flex:0 0 100%;width:100%;margin-top:0;}
.row-label{font-size:.92rem;line-height:1.5;}

/* 項目ごとの補足テキスト */
.row-note{font-size:.78rem;color:var(--sub);margin-top:2px;white-space:pre-wrap;word-break:break-word;}
.note-toggle{background:none;border:none;color:var(--orange-d);font-family:inherit;
  font-size:.72rem;font-weight:700;cursor:pointer;padding:1px 0;}
.row-note-input{display:none;width:100%;font-family:inherit;font-size:.82rem;color:var(--ink);
  background:#fff;border:1px solid var(--line);border-radius:6px;padding:5px 8px;margin-top:2px;}
.row-note-edit.open .note-toggle{display:none;}
.row-note-edit.open .row-note-input{display:block;}

/* すこし/たくさん・○/◎ のマス */
.lvcell{display:flex;gap:6px;flex:0 0 auto;align-items:center;}
.lvmarks{display:flex;gap:6px;}
/* 観客用：タップで表示（最初は内容を隠す） */
.reveal-btn{display:none;font-family:inherit;border:1.6px dashed var(--orange);background:#fff;
  color:var(--orange-d);border-radius:8px;min-width:62px;padding:7px 10px;font-weight:800;cursor:pointer;font-size:.9rem;}
/* 観客用：伏せている間はマスと補足を隠し、？ボタンだけ出す */
.masked .lvmarks{display:none;}
.masked .row-note{display:none;}
.masked .reveal-btn{display:inline-flex;align-items:center;justify-content:center;}
.sec-row.revealable,.theme-cell.revealable{cursor:pointer;border-radius:8px;}
.sec-row.revealable:active,.theme-cell.revealable:active{background:#fbeede;}
.lvbox{display:flex;flex-direction:column;align-items:center;gap:2px;background:none;border:none;
  font-family:inherit;cursor:pointer;padding:0;width:34px;}
.lvbox .lvmark{width:20px;height:20px;border:1.6px solid var(--line);border-radius:5px;background:#fff;
  display:flex;align-items:center;justify-content:center;font-size:.8rem;color:#fff;}
.lvbox .lvlabel{font-size:.6rem;color:var(--sub);}
.lvbox.on .lvmark{background:var(--orange);border-color:var(--orange);}
.lvbox.on .lvmark::after{content:"✓";}
.lvbox.on .lvlabel{color:var(--orange-d);font-weight:700;}

/* 注意な描写 */
.theme-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;border:1px solid var(--line);border-radius:10px;padding:12px;}
.theme-cell{display:flex;flex-direction:column;align-items:center;gap:4px;}
.theme-label{font-size:.86rem;font-weight:700;}
.theme-cell .lvbox{width:30px;}
.theme-cell .lvbox .lvlabel{font-size:.66rem;}

/* 種別（リアル/VR） */
.kind-edit{margin:0 0 10px;}
.kind-row{display:flex;gap:8px;}
.kind-btn{font-family:inherit;font-weight:700;font-size:.9rem;border:1.6px solid var(--line);
  background:#fff;color:var(--sub);border-radius:10px;padding:8px 16px;cursor:pointer;}
.kind-btn.on{background:var(--orange);border-color:var(--orange);color:#fff;}
.kind-badge{display:inline-block;align-self:end;justify-self:start;background:var(--orange);color:#fff;
  font-weight:800;font-size:.82rem;border-radius:999px;padding:6px 16px;}

/* ゲージ（5段階） */
.gauge{display:flex;gap:3px;}
.gseg{position:relative;width:16px;height:24px;border:1.5px solid var(--line);border-radius:4px;background:#fff;
  padding:0;cursor:pointer;font-family:inherit;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;}
.gseg .gseg-fill{position:absolute;inset:0;background:transparent;}
.gseg.on .gseg-fill{background:var(--orange);}
.gseg .gseg-num{position:relative;font-size:.6rem;color:var(--sub);font-weight:700;line-height:1;padding-bottom:2px;}
.gseg.on .gseg-num{color:#fff;}
.gauge-none{font-size:.7rem;color:var(--orange-d);font-weight:800;margin-left:6px;white-space:nowrap;}
.gauge-none.is-none{color:var(--sub);font-weight:700;}
.gauge-clear{font-family:inherit;font-size:.68rem;font-weight:700;color:var(--sub);background:#fff;
  border:1px solid var(--line);border-radius:7px;padding:3px 8px;margin-left:6px;cursor:pointer;white-space:nowrap;}
.gauge-clear:active{background:#f0ebe0;}

/* あり／なし */
/* あり／なし：2つ並べてどちらか1つを選ぶ */
.yngroup{display:inline-flex;gap:6px;}
.ynbox{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1.6px solid var(--line);
  border-radius:8px;padding:6px 14px;font-family:inherit;cursor:pointer;font-weight:800;font-size:.82rem;color:var(--sub);}
.ynbox .ynmark{width:14px;height:14px;border-radius:50%;border:1.6px solid var(--line);}
.ynbox.on{background:var(--orange);border-color:var(--orange);color:#fff;}
.ynbox.on .ynmark{background:#fff;border-color:#fff;}
.ynchip{display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:6px 14px;
  border-radius:8px;font-weight:800;font-size:.82rem;border:1.6px solid var(--line);}
.ynchip.on{background:var(--orange);border-color:var(--orange);color:#fff;}
.ynchip.is-none{color:var(--sub);background:#fff;}

/* 冒頭の定型文 */
.boilerplate{white-space:pre-wrap;font-size:.9rem;line-height:1.9;background:#fff;border:1px solid var(--line);
  border-left:4px solid var(--orange);border-radius:10px;padding:12px 14px;margin:14px 0;word-break:break-word;}

/* カテゴリごとの「その他」自由入力 */
.other-edit{margin-top:10px;}
.other-label{font-size:.74rem;color:var(--sub);font-weight:700;margin-bottom:3px;}
.other-input{width:100%;font-family:inherit;font-size:.92rem;color:var(--ink);background:#fff;
  border:1px solid var(--line);border-radius:8px;padding:7px 10px;}
.other-view{margin-top:8px;font-size:.86rem;background:#fff;border:1px dashed var(--line);border-radius:8px;padding:8px 10px;}
.other-view .other-label{display:inline;font-weight:800;color:var(--orange-d);margin:0;}
.other-view .other-text{white-space:pre-wrap;word-break:break-word;}

.sheet-foot{margin-top:16px;border-top:1px dashed var(--line);padding-top:8px;}
.credit{font-size:.7rem;color:var(--sub);text-align:center;}
.credit.copyright{margin-top:3px;letter-spacing:.02em;}

/* 保存後リンク表示 */
.result{background:#fff;border:1.5px solid var(--orange);border-radius:12px;padding:14px;margin:0 auto 14px;max-width:760px;}
.result h2{font-size:1rem;margin:0 0 8px;}
.linkbox{display:flex;gap:6px;margin:6px 0;}
.linkbox input{flex:1;font-family:inherit;font-size:.85rem;padding:8px;border:1px solid var(--line);border-radius:8px;background:#faf7f0;}
.warn{color:var(--orange-d);font-weight:700;font-size:.85rem;margin-top:8px;}
.hidden{display:none;}

/* ご利用にあたっての案内 */
.notice{max-width:760px;margin:0 auto 14px;background:#fff;border:1px solid var(--line);
  border-radius:12px;padding:10px 14px;font-size:.84rem;color:var(--ink);}
.notice>summary{cursor:pointer;font-weight:700;color:var(--orange-d);list-style:none;}
.notice>summary::-webkit-details-marker{display:none;}
.notice[open]>summary{margin-bottom:8px;}
.notice ul{margin:0;padding-left:1.1em;}
.notice li{margin:4px 0;line-height:1.7;}
/* 利用規約（著作権・免責・禁止事項） */
.notice h3{font-size:.86rem;color:var(--orange-d);margin:14px 0 4px;}
.notice p{margin:4px 0;line-height:1.8;}
.notice-copyright{margin-top:14px !important;padding-top:8px;border-top:1px dashed var(--line);
  text-align:center;font-size:.76rem;color:var(--sub);}

@media (max-width:560px){
  .sec-grid{grid-template-columns:1fr;}
  .theme-grid{grid-template-columns:repeat(3,1fr);}
  .sheet-top{grid-template-columns:1fr;}
  .sheet-head{flex-direction:column;align-items:flex-start;gap:12px;}
  .sheet-title{font-size:1.45rem;}
  .tw-logo{align-self:center;width:100%;max-width:320px;}
}

/* 印刷：A4・背景色を出す・操作系を隠す */
@media print{
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  @page{size:A4;margin:10mm;}
  body{background:#fff;padding:0;}
  .toolbar,.result,.no-print{display:none !important;}
  .sheet{border:none;box-shadow:none;border-radius:0;padding:6mm;}
  /* 見出しバンドの色・チケットロゴを印刷でもそのまま出す */
  .sheet-head{margin:0 0 6mm;border-radius:0;}
  .tw-logo{width:52mm;box-shadow:none;}
  .sheet-sec,.theme-grid{page-break-inside:avoid;}
  /* 印刷時はすべて表示（観客用の伏せ状態でも全部出す） */
  .masked .lvmarks{display:flex !important;}
  .masked .row-note{display:block !important;}
  .reveal-btn{display:none !important;}
}
