@charset "utf-8";
/* ============================================================
   Practical Profiling School — Application stylesheet
   File: /pps2/css/pps-app.css

   新デザインの本番スタイルシート。ログイン画面（.split / .brand）と
   ログイン後のサイドメニュー型シェル（.shell / .sidebar）の
   両方をこの1枚で賄う。C側からは pps_open_html() が読み込む。

   /pps2/css/pps-login.css は客先レビュー用モックアップ
   （login.html / login_b.html）専用の凍結ファイルであり、
   本番経路では読み込まれない。
   ============================================================ */

:root{
  /* --- 地色・文字 ------------------------------------------ */
  --ink:        #16202B;   /* 基本文字色（濃紺寄りの黒）      */
  --ink-2:      #3C4A59;   /* 副文字                          */
  --muted:      #6C7A88;   /* 補助文字                        */
  --paper:      #F4F1EC;   /* 和紙のような温かいオフホワイト  */
  --surface:    #FFFFFF;
  --line:       #E3DED5;
  --line-soft:  #EFEBE4;

  /* --- ブランド（ロゴの2色）-------------------------------- */
  --teal-900:   #10262B;   /* サイドバー最深部                */
  --teal-700:   #1D444C;
  --teal-500:   #35666E;   /* ロゴの緑                        */
  --wine-700:   #63163E;
  --wine-600:   #802050;   /* ロゴの臙脂＝主アクション        */
  --wine-500:   #98285F;
  --wine-tint:  rgba(128,32,80,.07);

  /* --- 神秘性のアクセント ---------------------------------- */
  --gold:       #C9A96A;   /* アンティークゴールド（罫・図） */
  --gold-soft:  rgba(201,169,106,.28);

  /* --- タイポ ---------------------------------------------- */
  --font-display: "Cormorant Garamond","Noto Serif JP",serif;
  --font-jp:      "Noto Serif JP","Hiragino Mincho ProN",serif;
  --font-body:    "Noto Sans JP","Hiragino Sans",system-ui,sans-serif;
  --font-mono:    "IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;

  --radius:   12px;
  --field-h:  56px;
  --panel-w:   46%;        /* ログイン画面・左ブランドパネル幅 */
  --sidebar-w: 268px;      /* ログイン後・サイドバー幅         */
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--paper);
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{ margin:0; font-weight:600; }
a{ color:inherit; }
img{ max-width:100%; }

/* ============================================================
   共通パーツ
   ============================================================ */

/* 小見出し（英字・等幅・レタースペース）＝知的な記号性 */
.eyebrow{
  margin:0 0 14px;
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:500;
  letter-spacing:.34em;
  text-transform:uppercase;
  color:var(--wine-600);
}
.eyebrow--onDark{ color:var(--gold); }

.title{
  font-family:var(--font-jp);
  font-size:27px;
  letter-spacing:.08em;
  line-height:1.4;
}
.title__en{
  display:block;
  margin-top:6px;
  font-family:var(--font-display);
  font-size:15px;
  font-weight:500;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--muted);
}

.lede{
  margin:14px 0 0;
  font-size:13.5px;
  color:var(--ink-2);
}

/* --- フィールド（フローティングラベル・jQuery不要）-------- */
.field{ position:relative; margin-top:18px; }
.field input{
  width:100%;
  height:var(--field-h);
  padding:22px 16px 8px;
  font-family:var(--font-body);
  font-size:16px;              /* iOS の自動ズーム回避 */
  color:var(--ink);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  outline:none;
  transition:border-color .18s, box-shadow .18s, background .18s;
}
.field input:hover{ border-color:#D2CABD; }
.field input:focus{
  border-color:var(--teal-500);
  box-shadow:0 0 0 3px rgba(53,102,110,.14);
}
.field label{
  position:absolute;
  left:17px; top:17px;
  font-size:15px;
  color:var(--muted);
  pointer-events:none;
  transform-origin:left top;
  transition:transform .16s ease, color .16s ease;
}
/* 未入力かつ未フォーカス以外は、ラベルを上に縮小移動 */
.field input:focus + label,
.field input:not(:placeholder-shown) + label{
  transform:translateY(-11px) scale(.72);
  color:var(--teal-500);
  letter-spacing:.1em;
}
.field--pw input{ padding-right:52px; }

.pw-toggle{
  position:absolute;
  right:8px; top:50%;
  width:38px; height:38px;
  margin-top:-19px;
  display:flex; align-items:center; justify-content:center;
  color:var(--muted);
  background:none; border:0; border-radius:9px;
  cursor:pointer;
  transition:color .16s, background .16s;
}
.pw-toggle:hover{ color:var(--teal-500); background:rgba(53,102,110,.08); }
.pw-toggle svg{ width:19px; height:19px; }
.pw-toggle .icon-off{ display:none; }
.pw-toggle[aria-pressed="true"] .icon-on{ display:none; }
.pw-toggle[aria-pressed="true"] .icon-off{ display:block; }

/* --- ボタン ---------------------------------------------- */
.btn{
  display:inline-flex;
  align-items:center; justify-content:center;
  gap:10px;
  width:100%;
  height:56px;
  margin-top:26px;
  padding:0 22px;
  font-family:var(--font-body);
  font-size:15px;
  font-weight:700;
  letter-spacing:.14em;
  color:#fff;
  background:linear-gradient(135deg,var(--wine-500),var(--wine-700));
  border:0;
  border-radius:var(--radius);
  cursor:pointer;
  box-shadow:0 10px 24px -12px rgba(99,22,62,.75);
  transition:transform .16s, box-shadow .16s, filter .16s;
}
.btn:hover{ transform:translateY(-1px); box-shadow:0 14px 30px -12px rgba(99,22,62,.85); }
.btn:active{ transform:translateY(0); filter:brightness(.96); }
.btn:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; }
.btn svg{ width:17px; height:17px; }

.sublinks{
  display:flex;
  flex-wrap:wrap;
  gap:8px 22px;
  margin-top:22px;
  font-size:13px;
}
.sublinks a{
  color:var(--ink-2);
  text-decoration:none;
  border-bottom:1px solid var(--line);
  padding-bottom:2px;
  transition:color .16s, border-color .16s;
}
.sublinks a:hover{ color:var(--wine-600); border-color:var(--wine-600); }

/* --- エラー表示（ログイン失敗など）------------------------ */
.alert{
  display:flex;
  align-items:flex-start;
  gap:11px;
  margin:22px 0 4px;
  padding:14px 16px;
  border:1px solid rgba(128,32,80,.28);
  border-left:3px solid var(--wine-600);
  border-radius:var(--radius);
  background:var(--wine-tint, rgba(128,32,80,.07));
  color:var(--wine-700);
}
.alert svg{
  flex:none;
  width:19px; height:19px;
  margin-top:2px;
}
.alert p{
  margin:0;
  font-size:13.5px;
  line-height:1.7;
}
/* パスワード変更の送信前チェック用（JS が hidden を外して出す）。
   .alert は display:flex なので [hidden] を明示しないと消えない */
.alert[hidden]{ display:none; }
/* フォームの上に出すエラー。見出しにくっつけ、フォームとの間は空ける
   （.page-head + .alert{margin-top:0} が後ろにあるので上は任せる）*/
.alert--form{ margin-bottom:22px; }

/* エラー・お知らせ1枚もの（pps_notice_html）の本文。
   .alert 側（エラー）はすでに .alert p が持っている */
.msg{
  margin:0;
  font-family:var(--font-jp);
  font-size:15px;
  line-height:1.95;
  letter-spacing:.04em;
  color:var(--ink-2);
}
/* 見出しの下に .alert がすぐ来ると 22px の上マージンが二重になる */
.page-head + .alert{ margin-top:0; }

.signature{
  margin:36px 0 0;
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.12em;
  color:var(--muted);
}

/* 罫（金の細線）＝神秘性の記号 */
.rule{
  height:1px;
  margin:26px 0;
  background:linear-gradient(90deg,var(--gold-soft),transparent);
}

/* ============================================================
   アストロラーベ（渾天儀）モチーフ
   十二支＝12目盛、六十干支＝60目盛の同心リングを
   ごく低速で回す。四柱推命の「盤」を抽象化したもの。
   ============================================================ */
.astro{ position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.astro svg{ position:absolute; }
.astro .spin-slow{  animation:ppsSpin 240s linear infinite; transform-origin:50% 50%; }
.astro .spin-rev{   animation:ppsSpin 360s linear infinite reverse; transform-origin:50% 50%; }
.astro .spin-fast{  animation:ppsSpin 120s linear infinite; transform-origin:50% 50%; }
@keyframes ppsSpin{ to{ transform:rotate(360deg); } }

/* 星屑 */
.stars{ position:absolute; inset:0; pointer-events:none; }
.stars i{
  position:absolute;
  width:2px; height:2px;
  background:#fff;
  border-radius:50%;
  opacity:.5;
  animation:ppsTwinkle 5s ease-in-out infinite;
}
@keyframes ppsTwinkle{ 0%,100%{opacity:.18;} 50%{opacity:.75;} }

@media (prefers-reduced-motion: reduce){
  .astro .spin-slow,.astro .spin-rev,.astro .spin-fast,.stars i{ animation:none; }
}

/* ============================================================
   A案：Astrolabe Split
   左＝ログイン後のサイドメニューと同じ色面（世界観の予告）
   右＝和紙色の作業面（＝コンテンツ領域）
   ============================================================ */
.split{
  display:grid;
  grid-template-columns:var(--panel-w) 1fr;
  min-height:100vh;
  min-height:100dvh;
}

.brand{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:46px 48px;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(120% 90% at 12% 0%, #24505A 0%, transparent 55%),
    linear-gradient(165deg,var(--teal-700) 0%,var(--teal-900) 62%,#0B1A1F 100%);
}
/* .astro は絶対配置のまま残す（ここで position を上書きすると潰れる） */
.brand > *:not(.astro){ position:relative; z-index:2; }
.brand__logo img{ width:250px; }
.brand__copy{ max-width:30em; }
.brand__lead{
  margin:0;
  font-family:var(--font-jp);
  font-size:30px;
  font-weight:500;
  line-height:1.85;
  letter-spacing:.1em;
  text-shadow:0 2px 20px rgba(0,0,0,.35);
}
.brand__lead em{
  font-style:normal;
  color:var(--gold);
}
.brand__sub{
  margin:20px 0 0;
  max-width:24em;
  font-size:13px;
  line-height:2;
  color:rgba(255,255,255,.72);
}
.brand__meta{
  display:flex;
  gap:26px;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.24em;
  text-transform:uppercase;
  color:rgba(255,255,255,.45);
}
.brand__meta span{ white-space:nowrap; }

.panel{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:56px 40px;
}
.panel__inner{ width:100%; max-width:400px; }

/* --- A案 レスポンシブ ------------------------------------- */
@media (max-width:900px){
  .split{ grid-template-columns:1fr; }
  .brand{
    padding:26px 24px 30px;
    min-height:230px;
    justify-content:flex-end;
    gap:18px;
  }
  .brand__logo img{ width:190px; }
  .brand__lead{ font-size:21px; line-height:1.7; }
  .brand__sub{ display:none; }
  .brand__meta{ display:none; }
  .panel{ padding:34px 22px 46px; }
}
/* --- アストロラーベの配置 --------------------------------- */
.brand .astro svg{
  right:-190px; bottom:-170px;
  width:780px; height:780px;
  opacity:.55;
}
@media (max-width:900px){
  .brand .astro svg{ right:-190px; bottom:-230px; width:520px; height:520px; opacity:.4; }
}
.astro text{
  font-family:var(--font-jp);
  fill:#C9A96A;
  text-anchor:middle;
}

/* ============================================================
   サイドメニュー型シェル
   左＝ログイン画面の .brand と同じ色面（遷移で色が繋がる）
   右＝和紙色の作業面
   ============================================================ */
.shell{
  display:grid;
  grid-template-columns:var(--sidebar-w) 1fr;
  min-height:100vh;
  min-height:100dvh;
}

/* --- サイドバー ------------------------------------------- */
.sidebar{
  position:sticky;
  top:0;
  display:flex;
  flex-direction:column;
  height:100vh;
  height:100dvh;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(120% 70% at 12% 0%, #24505A 0%, transparent 55%),
    linear-gradient(165deg,var(--teal-700) 0%,var(--teal-900) 62%,#0B1A1F 100%);
}
.sidebar > *:not(.astro){ position:relative; z-index:2; }
.sidebar .astro svg{
  left:-230px; bottom:-260px;
  width:600px; height:600px;
  opacity:.30;
}

.sidebar__logo{
  flex:none;
  display:block;
  padding:28px 26px 22px;
}
.sidebar__logo img{ width:172px; }

/* --- ナビゲーション --------------------------------------- */
.nav{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  padding:4px 14px 20px;
  scrollbar-width:thin;
  scrollbar-color:rgba(201,169,106,.35) transparent;
}
.nav::-webkit-scrollbar{ width:6px; }
.nav::-webkit-scrollbar-thumb{ background:rgba(201,169,106,.35); border-radius:3px; }

.nav__label{
  margin:20px 0 7px;
  padding:0 12px;
  font-family:var(--font-mono);
  font-size:9.5px;
  font-weight:500;
  letter-spacing:.26em;
  text-transform:uppercase;
  color:var(--gold);
  opacity:.72;
}
.nav__label:first-child{ margin-top:4px; }

.nav ul{ margin:0; padding:0; list-style:none; }
.nav li + li{ margin-top:2px; }
.nav a{
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 12px;
  font-size:13.5px;
  letter-spacing:.03em;
  color:rgba(255,255,255,.76);
  text-decoration:none;
  border-radius:9px;
  transition:background .16s, color .16s;
}
.nav a:hover{ background:rgba(255,255,255,.07); color:#fff; }
.nav a:focus-visible{ outline:2px solid var(--gold); outline-offset:-2px; }
.nav svg{
  flex:none;
  width:17px; height:17px;
  stroke:currentColor;
  stroke-width:1.6;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.82;
}
/* 現在地。臙脂の左罫＋わずかな金の面で示す */
.nav a.is-active{
  color:#fff;
  background:rgba(201,169,106,.13);
  box-shadow:inset 3px 0 0 var(--wine-500);
}
.nav a.is-active svg{ color:var(--gold); opacity:1; }

/* --- チャート出力可能数（下部ラインの上）------------------ */
.sidebar__charts{
  flex:none;
  margin:8px 14px 12px;
  padding:13px 15px 15px;
  background:rgba(201,169,106,.10);
  border:1px solid rgba(201,169,106,.26);
  border-radius:10px;
}
/* 見出しは英字の小見出し＋和文。他画面の .eyebrow → .title と同じ流儀 */
.sidebar__charts dt{ margin:0; }
.sidebar__charts dt .en{
  display:block;
  font-family:var(--font-mono);
  font-size:9px;
  font-weight:500;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--gold);
}
.sidebar__charts dt .ja{
  display:block;
  margin-top:2px;
  font-family:var(--font-jp);
  font-size:12px;
  letter-spacing:.08em;
  color:rgba(255,255,255,.78);
}
/* 数値は行の右端に揃える（単位も含めて右寄せ）*/
.sidebar__charts dd{
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  gap:6px;
  margin:5px 0 0;
  font-family:var(--font-display);
  font-size:40px;
  font-weight:600;
  line-height:1.1;
  letter-spacing:.03em;
  color:#fff;
}
.sidebar__charts dd small{
  font-family:var(--font-body);
  font-size:12.5px;
  font-weight:400;
  letter-spacing:.1em;
  color:rgba(255,255,255,.66);
}
/* 「無制限」は日本語3文字なので数字と同じ級数だと大きすぎる */
.sidebar__charts dd.is-unlimited{
  font-family:var(--font-jp);
  font-size:21px;
  font-weight:500;
  letter-spacing:.12em;
}
/* 残りわずか。臙脂に寄せて気付かせる */
.sidebar__charts--warn{
  background:rgba(152,40,95,.22);
  border-color:rgba(201,169,106,.34);
}
.sidebar__charts--warn dd{ color:#F3C9D9; }

/* --- サイドバー下部のユーザ情報 --------------------------- */
.sidebar__user{
  flex:none;
  display:flex;
  align-items:center;
  gap:11px;
  margin:0 14px 16px;
  padding:14px 14px;
  border-top:1px solid rgba(201,169,106,.22);
}
.sidebar__user .avatar{
  flex:none;
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  color:var(--gold);
  border:1px solid rgba(201,169,106,.4);
  border-radius:50%;
}
.sidebar__user .avatar svg{ width:19px; height:19px; stroke:currentColor; stroke-width:1.6; fill:none; }
.sidebar__user__body{ min-width:0; }
.user-name{
  margin:0;
  font-family:var(--font-jp);
  font-size:13.5px;
  letter-spacing:.04em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.user-role{
  display:block;
  font-family:var(--font-mono);
  font-size:9.5px;
  letter-spacing:.16em;
  color:rgba(255,255,255,.5);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ============================================================
   作業面
   ============================================================ */
.content{
  min-width:0;
  padding:42px 46px 64px;
}
.content__inner{ max-width:940px; }

.page-head{ margin-bottom:30px; }
.page-head .title{ font-size:25px; }

/* --- セクション ------------------------------------------- */
.section{ margin-bottom:34px; }
.section__title{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 14px;
  font-family:var(--font-jp);
  font-size:15px;
  font-weight:500;
  letter-spacing:.1em;
  color:var(--ink-2);
}
.section__title::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:linear-gradient(90deg,var(--gold-soft),transparent);
}

/* --- 機能タイル ------------------------------------------- */
.tiles{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(228px,1fr));
  gap:13px;
}
.tile{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  padding:16px 18px;
  font-family:var(--font-body);
  font-size:14px;
  font-weight:500;
  letter-spacing:.04em;
  text-align:left;
  color:var(--ink);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  cursor:pointer;
  transition:border-color .16s, box-shadow .16s, transform .16s;
}
.tile:hover{
  border-color:var(--teal-500);
  box-shadow:0 12px 26px -18px rgba(16,38,43,.55);
  transform:translateY(-1px);
}
.tile:active{ transform:translateY(0); }
.tile:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
.tile__icon{
  flex:none;
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  color:var(--teal-500);
  background:rgba(53,102,110,.08);
  border-radius:10px;
  transition:color .16s, background .16s;
}
.tile__icon svg{ width:19px; height:19px; stroke:currentColor; stroke-width:1.6; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.tile:hover .tile__icon{ color:var(--wine-600); background:var(--wine-tint); }
.tile__body{ min-width:0; }
.tile__body b{ display:block; font-weight:500; }
.tile__body span{
  display:block;
  margin-top:2px;
  font-size:11.5px;
  font-weight:400;
  line-height:1.6;
  color:var(--muted);
}
/* 主要導線（新規入力）だけ臙脂で強調 */
.tile--primary{ border-color:rgba(128,32,80,.3); }
.tile--primary .tile__icon{ color:#fff; background:linear-gradient(135deg,var(--wine-500),var(--wine-700)); }
.tile--primary:hover{ border-color:var(--wine-600); }
.tile--primary:hover .tile__icon{ color:#fff; }

/* ============================================================
   モバイル（ドロワー化）
   ============================================================ */
.mobile-header{ display:none; }
.sidebar-overlay{ display:none; }

@media (max-width:900px){
  .shell{ grid-template-columns:1fr; }

  .mobile-header{
    position:sticky;
    top:0;
    z-index:40;
    display:flex;
    align-items:center;
    gap:12px;
    height:56px;
    padding:0 14px;
    color:#fff;
    background:var(--teal-900);
  }
  .hamburger-btn{
    width:40px; height:40px;
    display:flex; align-items:center; justify-content:center;
    color:#fff;
    background:none;
    border:0;
    border-radius:9px;
    cursor:pointer;
  }
  .hamburger-btn svg{ width:21px; height:21px; stroke:currentColor; stroke-width:1.8; fill:none; stroke-linecap:round; }
  .mobile-header__title{
    font-family:var(--font-mono);
    font-size:10.5px;
    letter-spacing:.24em;
    text-transform:uppercase;
    color:rgba(255,255,255,.7);
  }

  .sidebar{
    position:fixed;
    left:0; top:0;
    z-index:60;
    width:280px;
    transform:translateX(-100%);
    transition:transform .22s ease;
  }
  .sidebar.is-open{ transform:translateX(0); }

  .sidebar-overlay{
    position:fixed;
    inset:0;
    z-index:50;
    display:block;
    background:rgba(8,19,26,.55);
    opacity:0;
    visibility:hidden;
    transition:opacity .22s ease, visibility .22s;
  }
  .sidebar-overlay.is-open{ opacity:1; visibility:visible; }

  .content{ padding:26px 20px 52px; }
  .page-head .title{ font-size:21px; }
  .tiles{ grid-template-columns:1fr; }
}

@media (prefers-reduced-motion: reduce){
  .sidebar,.sidebar-overlay,.tile{ transition:none; }
}

/* ============================================================
   公開ページ（未ログイン）の枠
   サイドバーが出せないので、細いトップバー＋中央寄せカードにする。
   バーの色はサイドバーと同じ最深部の緑。
   ============================================================ */
.plain{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  min-height:100dvh;
}
.topbar{
  flex:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  height:62px;
  padding:0 24px;
  color:#fff;
  background:var(--teal-900);
}
.topbar__logo{ display:block; }
.topbar__logo img{ display:block; width:150px; }
.topbar__link{
  flex:none;
  padding:8px 16px;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:rgba(255,255,255,.78);
  background:none;
  border:1px solid rgba(201,169,106,.42);
  border-radius:999px;
  cursor:pointer;
  transition:color .16s, border-color .16s, background .16s;
}
.topbar__link:hover{ color:#fff; border-color:var(--gold); background:rgba(201,169,106,.14); }

.plain__main{
  flex:1 1 auto;
  display:flex;
  justify-content:center;
  padding:38px 20px 60px;
}
.plain__inner{ width:100%; max-width:660px; }

/* ============================================================
   別窓（バイオリズムなど）
   サイドバーもトップバーも出さず、中身だけを中央に置く。
   .plain__main / .plain__inner に重ねて使う（HTML 側で両方付ける）。
   単独にしないこと。古い CSS をキャッシュしているブラウザで
   余白が消えて本文が窓の左端に貼り付く。
   ============================================================ */
.popup{ padding:30px 30px 46px; }
.popup__inner{ max-width:640px; }
.popup .page-head{ margin-bottom:22px; }
.popup .page-head .lede{ margin:8px 0 0; }
.popup .chart-actions .btn{ flex:0 0 auto; min-width:180px; }
/* 別窓の中で .block に入力行を置くとき（PDF/CSV の資格選択） */
.popup .block .row{ margin-top:20px; }

/* --- 用語説明（別窓 setsumei）------------------------------
   本文は $DOC_DIR/yogo/*.txt をそのまま流し込んでいる。
   このファイルは旧 /pps/ 環境と共有なので中身は直せない。
   kan / shi / nacchin に入っている旧式の
   <TABLE BORDER=1 CELLSPACING=0 BORDERCOLOR BGCOLOR WIDTH>
   を、ここで見た目だけ上書きする。
   ------------------------------------------------------------ */
.setsumei{
  overflow-x:auto;
  font-size:14px;
  line-height:1.95;
  color:var(--ink-2);
}
.setsumei b,
.setsumei strong{ color:var(--ink); font-weight:600; }
.setsumei table{
  width:auto !important;
  margin:20px 0 6px;
  border:0;
  border-collapse:collapse;
  font-size:12.5px;
  line-height:1.6;
}
.setsumei table td,
.setsumei table th{
  padding:7px 13px;
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--ink-2);
  text-align:center;
  white-space:nowrap;
}
.setsumei table tr:first-child td,
.setsumei table tr:first-child th{
  background:rgba(201,169,106,.16);
  color:var(--ink);
}
.setsumei table b{ font-weight:600; }

@media (max-width:520px){
  .popup{ padding:24px 18px 36px; }
}

/* ============================================================
   入力フォーム
   ============================================================ */
.form-card{
  padding:30px 32px 34px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
}

/* .section__title に英字・任意バッジを足す */
.section__title span{
  font-family:var(--font-display);
  font-size:13px;
  font-weight:500;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--muted);
}
.section__title em{
  font-style:normal;
  padding:2px 9px;
  font-family:var(--font-mono);
  font-size:9px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:999px;
}
/* 2つ目以降のセクションは間隔を空ける */
.form-card .section + .section{ margin-top:30px; }
/* 見出しの直後の入力欄は .field の margin-top を重ねない */
.section__title + .field{ margin-top:0; }
.form-card .section{ margin-bottom:0; }

.row{ display:flex; flex-wrap:wrap; gap:12px; }
.row[hidden]{ display:none; }
.row .field{ flex:1 1 0; min-width:0; margin-top:0; }
.f{ flex:1 1 0; min-width:96px; }
.f--year{ flex:1.7 1 0; }
.f__label{
  display:block;
  margin:0 0 6px;
  font-family:var(--font-mono);
  font-size:9.5px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
}

/* --- セレクト（native。jQuery のオーバーレイは使わない）--- */
.select{ position:relative; }
.select select{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  height:52px;
  padding:0 38px 0 14px;
  font-family:var(--font-body);
  font-size:16px;              /* iOS の自動ズーム回避 */
  color:var(--ink);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  cursor:pointer;
  outline:none;
  transition:border-color .18s, box-shadow .18s;
}
.select select:hover{ border-color:#D2CABD; }
.select select:focus{
  border-color:var(--teal-500);
  box-shadow:0 0 0 3px rgba(53,102,110,.14);
}
.select::after{           /* 山形の矢印 */
  content:"";
  position:absolute;
  right:17px; top:50%;
  width:7px; height:7px;
  margin-top:-6px;
  border-right:1.5px solid var(--muted);
  border-bottom:1.5px solid var(--muted);
  transform:rotate(45deg);
  pointer-events:none;
}

/* --- トグルスイッチ（出生時刻の有無）--------------------- */
.switch{
  display:inline-flex;
  align-items:center;
  gap:12px;
  margin-top:18px;
  cursor:pointer;
  -webkit-user-select:none;
  user-select:none;
}
.switch input{ position:absolute; width:1px; height:1px; opacity:0; }
.switch__track{
  position:relative;
  flex:none;
  width:44px; height:24px;
  background:#DCD6CB;
  border-radius:999px;
  transition:background .18s;
}
.switch__track::after{
  content:"";
  position:absolute;
  left:3px; top:3px;
  width:18px; height:18px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,.25);
  transition:transform .18s;
}
.switch input:checked + .switch__track{ background:var(--teal-500); }
.switch input:checked + .switch__track::after{ transform:translateX(20px); }
.switch input:focus-visible + .switch__track{ box-shadow:0 0 0 3px var(--gold-soft); }
.switch__text{ font-size:13.5px; color:var(--ink-2); }
/* トグル直後の行（時・分）*/
.switch + .row{ margin-top:16px; }

/* --- 選択カード（性別）----------------------------------- */
.choices{ display:flex; gap:12px; }
.choice{
  position:relative;
  flex:1 1 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1px;
  padding:15px 12px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  cursor:pointer;
  transition:border-color .16s, background .16s;
}
.choice input{ position:absolute; width:1px; height:1px; opacity:0; }
.choice b{
  font-family:var(--font-jp);
  font-size:15px;
  font-weight:500;
  letter-spacing:.1em;
}
.choice small{
  font-family:var(--font-mono);
  font-size:9px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
}
.choice:hover{ border-color:#D2CABD; }
/* :has() 非対応ブラウザ向けに JS が .is-selected も付ける */
.choice.is-selected,
.choice:has(input:checked){
  border-color:var(--wine-600);
  background:var(--wine-tint);
}
.choice.is-selected small,
.choice:has(input:checked) small{ color:var(--wine-600); }
.choice:has(input:focus-visible){ box-shadow:0 0 0 3px var(--gold-soft); }

/* --- 補足ボックス ---------------------------------------- */
.notice{
  margin-top:28px;
  padding:16px 18px;
  background:rgba(53,102,110,.05);
  border:1px solid var(--line);
  border-left:3px solid var(--teal-500);
  border-radius:var(--radius);
}
.notice__title{
  margin:0 0 7px;
  font-family:var(--font-mono);
  font-size:9.5px;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--teal-500);
}
.notice p{
  margin:0;
  font-size:12.5px;
  line-height:1.9;
  color:var(--ink-2);
}

/* --- ボタン列 -------------------------------------------- */
.actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:30px;
}
.actions .btn{ width:auto; margin-top:0; }
.btn--wide{ flex:2 1 240px; }
.btn--quiet{
  flex:1 1 130px;
  color:var(--ink-2);
  background:var(--surface);
  border:1px solid var(--line);
  box-shadow:none;
}
.btn--quiet:hover{
  color:var(--teal-700);
  border-color:var(--teal-500);
  transform:none;
  box-shadow:none;
}
.btn--quiet:active{ filter:none; }

.link-btn{
  margin-top:22px;
  padding:0 0 2px;
  font-family:var(--font-body);
  font-size:13px;
  color:var(--ink-2);
  background:none;
  border:0;
  border-bottom:1px solid var(--line);
  cursor:pointer;
  transition:color .16s, border-color .16s;
}
.link-btn:hover{ color:var(--wine-600); border-color:var(--wine-600); }

/* ============================================================
   確認モーダル
   旧 confirm.css / confirm.js は使わない（新デザインで完結させる）
   ============================================================ */
.modal{
  position:fixed;
  inset:0;
  z-index:200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(8,19,26,.62);
  -webkit-backdrop-filter:blur(3px);
  backdrop-filter:blur(3px);
  opacity:0;
  visibility:hidden;
  transition:opacity .18s ease, visibility .18s;
}
.modal.is-open{ opacity:1; visibility:visible; }
.modal__box{
  width:100%;
  max-width:428px;
  padding:30px 30px 26px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 40px 80px -30px rgba(0,0,0,.55);
  transform:translateY(10px);
  transition:transform .18s ease;
}
.modal.is-open .modal__box{ transform:translateY(0); }
.modal__title{
  margin:0;
  font-family:var(--font-jp);
  font-size:19px;
  font-weight:500;
  letter-spacing:.14em;
}
.modal__body{
  margin:16px 0 0;
  font-size:13.5px;
  line-height:1.95;
  color:var(--ink-2);
}
.modal__body b{
  display:inline-block;
  margin:8px 0;
  font-family:var(--font-jp);
  font-size:18px;
  font-weight:500;
  letter-spacing:.08em;
  color:var(--wine-600);
}
.modal__actions{
  display:flex;
  gap:10px;
  margin-top:26px;
}
.modal__actions .btn{ flex:1 1 0; width:auto; margin-top:0; }

@media (max-width:640px){
  .form-card{ padding:22px 18px 26px; }
  .plain__main{ padding:24px 14px 48px; }
  .topbar{ height:56px; padding:0 16px; }
  .topbar__logo img{ width:128px; }
  .f{ min-width:0; }
  .modal__box{ padding:24px 20px 22px; }
  .modal__actions{ flex-direction:column-reverse; }
}

@media (prefers-reduced-motion: reduce){
  .modal,.modal__box,.switch__track,.switch__track::after{ transition:none; }
}

/* ============================================================
   チャート出力ページ
   ============================================================ */

/* --- 白いブロック（1つの意味のかたまり）------------------ */
.block{
  padding:24px 26px 26px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
}
.block + .block{ margin-top:16px; }
.block > .section__title{ margin-top:0; }

/* --- 見出しラベル（ふりがな付き。クリックで説明を開く）--- */
.term{
  display:block;
  color:inherit;
  text-decoration:none;
}
.term .kana{
  display:block;
  font-size:9px;
  line-height:1.5;
  letter-spacing:.04em;
  color:var(--muted);
}
.term .name{
  font-family:var(--font-jp);
  font-size:13.5px;
  font-weight:500;
  letter-spacing:.06em;
  white-space:nowrap;
}
a.term .name{ border-bottom:1px dotted var(--gold); }
a.term:hover .name{ color:var(--wine-600); border-bottom-color:var(--wine-600); }
a.term:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }

/* --- 項目リスト（基本情報・判定）-------------------------- */
.facts{
  display:grid;
  grid-template-columns:max-content 1fr;
  margin:0;
}
.facts > dt,
.facts > dd{
  padding:12px 0;
  border-top:1px solid var(--line-soft);
}
.facts > dt{
  padding-right:26px;
  font-family:var(--font-jp);
  font-size:12px;
  letter-spacing:.1em;
  color:var(--muted);
  white-space:nowrap;
}
.facts > dd{
  margin:0;
  font-family:var(--font-jp);
  font-size:15px;
  line-height:1.8;
  letter-spacing:.04em;
  color:var(--ink);
}
.facts > dt:first-of-type,
.facts > dd:first-of-type{ padding-top:0; border-top:0; }
.facts .sub{
  margin-left:10px;
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.06em;
  color:var(--muted);
}

/* --- 値の並び（能力など）--------------------------------- */
.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
}
.chips li{
  padding:5px 13px;
  font-family:var(--font-jp);
  font-size:13px;
  letter-spacing:.06em;
  color:var(--teal-700);
  background:rgba(53,102,110,.07);
  border:1px solid rgba(53,102,110,.18);
  border-radius:999px;
}
.chips li.is-empty{ color:var(--muted); background:none; border-style:dashed; }

/* --- 順位つきの値（最大吉方・運期）------------------------ */
.ranks{ margin:0; padding:0; list-style:none; }
.ranks li{
  display:flex;
  align-items:baseline;
  gap:12px;
  padding:3px 0;
  font-size:14px;
}
.ranks li span{
  flex:none;
  width:4.2em;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.14em;
  color:var(--muted);
}
.ranks li b{ font-family:var(--font-jp); font-weight:500; letter-spacing:.06em; }

/* --- 節入（12ヶ月）--------------------------------------- */
.sekki-wrap{ overflow-x:auto; }
.sekki{
  display:grid;
  grid-template-columns:repeat(12,minmax(66px,1fr));
  gap:1px;
  min-width:100%;
  background:var(--line);
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
}
.sekki > div{
  padding:10px 4px 11px;
  text-align:center;
  background:var(--surface);
  font-family:var(--font-mono);
  font-size:10.5px;
  line-height:1.7;
  color:var(--muted);
}
.sekki > div b{
  display:block;
  font-family:var(--font-jp);
  font-size:13px;
  font-weight:500;
  letter-spacing:.04em;
  color:var(--ink);
}
.sekki > div .name{
  display:block;
  font-family:var(--font-jp);
  font-size:10.5px;
  color:var(--teal-500);
}
/* 生まれ月 */
.sekki > div.is-now{ background:var(--wine-tint); }
.sekki > div.is-now b{ color:var(--wine-700); }
.sekki > div.is-now .name{ color:var(--wine-600); }

/* --- 表（四柱・命式）------------------------------------- */
.table-wrap{ overflow-x:auto; }
.table{
  width:100%;
  min-width:640px;
  border-collapse:collapse;
  font-size:13px;
}
.table th,
.table td{
  padding:9px 10px;
  text-align:center;
  vertical-align:middle;
  border:1px solid var(--line);
}
.table th{
  font-weight:500;
  color:var(--ink-2);
  background:rgba(53,102,110,.055);
}
.table td{ background:var(--surface); }
.table td.wide{ width:30%; text-align:left; font-size:12.5px; line-height:1.8; }
/* 干・支は大きく見せる（この表の主役）*/
.table td.eto{
  font-family:var(--font-jp);
  font-size:20px;
  letter-spacing:.06em;
  color:var(--ink);
}
.table th.pillar{
  font-family:var(--font-jp);
  font-size:14px;
  text-align:right;
  white-space:nowrap;
  background:rgba(201,169,106,.10);
}

/* --- 命式（ラベルと値の対）------------------------------- */
.meishiki{
  display:grid;
  grid-template-columns:max-content 1fr max-content 1fr;
  margin:0;
}
.meishiki > dt,
.meishiki > dd{
  padding:12px 0;
  border-top:1px solid var(--line-soft);
}
.meishiki > dt{ padding-right:20px; }
.meishiki > dd{
  margin:0;
  padding-right:26px;
  font-family:var(--font-jp);
  font-size:15px;
  line-height:1.7;
  letter-spacing:.04em;
}
.meishiki > dd:last-child{ padding-right:0; }
/* 値が長いものは残り全部を使う */
.meishiki .span{ grid-column:2 / -1; padding-right:0; }

/* ============================================================
   バイオリズム図（12年サイクル）
   honmei4.c の pps_bio() が出すインライン SVG。
   viewBox は "-12 -6 566 556"。座標は C 側の bio_layout[] が持つ。
   ============================================================ */
/*
   図の上下の余白は SVG の viewBox 側で詰めてある（pps_bio()）。
   ここで padding を足すと二重になるので 0。
*/
.bio-wrap{ padding:0; }
.bio-svg{
  display:block;
  width:100%;
  max-width:600px;
  height:auto;
  margin:0 auto;
}

/* 12年の周回 */
.bio-line{
  fill:rgba(53,102,110,.05);
  stroke:var(--teal-500);
  stroke-width:2;
  stroke-linejoin:round;
}
/* 勢いを示す点。色と大きさは C 側が属性で付ける */
.bio-dot{
  stroke:var(--surface);
  stroke-width:2;
}

/* 年月時の枠（3段） */
.bio-box rect{
  fill:var(--surface);
  stroke:var(--line);
  stroke-width:1;
}
.bio-box line{ stroke:var(--line-soft); stroke-width:1; }
.bio-box text{
  font-family:var(--font-body);
  font-size:12px;
  font-weight:500;
  fill:var(--ink-2);
  text-anchor:middle;
}

/* ポジション名（クリックで説明が開く） */
.bio-name text{
  font-family:var(--font-jp);
  font-size:12.5px;
  font-weight:500;
  letter-spacing:.02em;
  fill:var(--ink);
}
.bio-name .eto{ fill:var(--muted); }
.bio-name{ cursor:pointer; }
.bio-name:hover text{ fill:var(--wine-600); }
.bio-name:focus-visible text{ outline:2px solid var(--gold); }

/* 年自己＝いまいる場所（楕円・臙脂）。月自己は角丸四角・深緑 */
.bio-jiko ellipse,
.bio-jiko rect{
  fill:var(--surface);
  stroke:var(--wine-600);
  stroke-width:1.8;
}
.bio-jiko text{
  font-family:var(--font-jp);
  font-size:10.5px;
  font-weight:600;
  letter-spacing:0;
  fill:var(--wine-700);
  text-anchor:middle;
}
.bio-jiko--tsuki rect{ stroke:var(--teal-500); }
.bio-jiko--tsuki text{ fill:var(--teal-700); }

/* --- 注意書き ------------------------------------------- */
.callout{
  padding:14px 16px;
  font-size:13px;
  line-height:1.9;
  color:var(--wine-700);
  background:var(--wine-tint);
  border:1px solid rgba(128,32,80,.24);
  border-left:3px solid var(--wine-600);
  border-radius:var(--radius);
}

/* --- 出力ボタン群 ---------------------------------------- */
.chart-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}
.chart-actions .btn{ width:auto; margin-top:0; flex:1 1 200px; }
.chart-actions .btn--quiet{ flex:1 1 150px; }
/* 2段に割ったとき（管理者のチャート）の段間 */
.chart-actions + .chart-actions{ margin-top:12px; }

/* 判定（command=h）は .notice と .block が交互に来る */
.notice + .block{ margin-top:16px; }
.block + .notice{ margin-top:16px; }

/* --- 吉神・凶神の説明（command=k）------------------------- */
/* 柱（年／月／日／時）の見出し */
.kami__pillar{
  margin:26px 0 10px;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.2em;
  color:var(--wine-600);
}
.kami > .kami__pillar:first-child{ margin-top:0; }
/* 神ひとつぶん。金の細い縦罫でぶら下げる */
.kami__row{
  padding:11px 0 11px 15px;
  border-left:2px solid var(--gold-soft);
}
.kami__row + .kami__row{ margin-top:9px; }
.kami__name{
  margin:0 0 5px;
  font-family:var(--font-jp);
  font-size:14px;
  font-weight:600;
  letter-spacing:.04em;
  color:var(--ink);
}
.kami__row .setsumei{ font-size:13px; line-height:1.9; }

/* --- １００歳運期表（command=u）---------------------------- */
/* 101行 × 11列。窓を広く取り、列見出しを貼り付ける */
.popup--wide{ padding:30px 24px 46px; }
.popup--wide .popup__inner{ max-width:880px; }
/* 表を 820px 収めるため、この画面だけカードの内側を詰める */
.popup--wide .block{ padding:18px 16px 20px; }
.table--unki{
  min-width:820px;
  font-size:12px;
}
.table--unki th,
.table--unki td{ padding:6px 8px; }
/* 「大運周期　順行 5年運」の帯。ここは貼り付けない（スクロールで流す）*/
.table--unki th.unki-cycle{
  font-family:var(--font-jp);
  font-size:13px;
  letter-spacing:.08em;
  background:rgba(201,169,106,.14);
  color:var(--ink);
}
/* 列見出しだけ貼り付ける。背景は不透明でないと下の行が透ける */
.table--unki thead tr + tr th{
  position:sticky;
  top:0;
  z-index:2;
  background:#F2F5F5;
  line-height:1.45;
}
/* 同名の列（天干星・十二運）がどちらの段のものかを示す小書き */
.table--unki thead th span{
  display:block;
  font-family:var(--font-mono);
  font-size:8.5px;
  letter-spacing:.16em;
  color:var(--muted);
}
/* 大運のまとまり（rowspan）*/
.table--unki td.taiun{ background:rgba(201,169,106,.07); white-space:nowrap; }
.table--unki td.eto{ font-size:14px; letter-spacing:.04em; white-space:nowrap; }
.table--unki td.mark{ font-size:12px; letter-spacing:-.04em; white-space:nowrap; }
/* 空亡（天中殺）の年 */
.table--unki td.kubo{ background:rgba(22,32,43,.10); }
/* 天徳貴人の干支 */
.tentoku{ color:var(--wine-600); font-weight:600; }
/* 五行干合化気。成立した五行を臙脂で示す */
.table--unki td.gogyou{
  text-align:left;
  font-size:11.5px;
  line-height:1.7;
  white-space:nowrap;
  color:var(--ink-2);
}
.table--unki td.gogyou b{ color:var(--wine-600); font-weight:600; }
/* 101行を目で追うための行ハイライト */
.table--unki tbody tr:hover td{ background:rgba(201,169,106,.13); }

/* --- 出力履歴／再出力（command=H）-------------------------- */
.table--history{ min-width:720px; }
.table--history th,
.table--history td{ padding:8px 10px; }
.table--history tbody tr:hover td{ background:rgba(201,169,106,.10); }
.table--history td.nowrap,
.table--ticket td.nowrap{ white-space:nowrap; font-family:var(--font-mono); font-size:11.5px; color:var(--ink-2); }
.table--history th.dob,
.table--history td.dob{ text-align:left; }
.table--history td.dob{
  white-space:nowrap;
  font-family:var(--font-jp);
  font-size:14px;
  letter-spacing:.03em;
  color:var(--ink);
}
/*
  年・月・日を全行でそろえる。数字だけ等幅にして桁数ぶんの幅
  （年 4ch・月日 2ch）を確保し、右寄せで詰める。
  letter-spacing は幅の計算を狂わせるのでここだけ 0 に戻す。
*/
.table--history td.dob .n{
  display:inline-block;
  width:2ch;
  margin-left:3px;
  text-align:right;
  font-family:var(--font-mono);
  font-size:13px;
  letter-spacing:0;
}
.table--history td.dob .n--y{ width:4ch; margin-left:0; }
.table--history td.dob .sub{ margin-left:6px; font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.table--history td.name{ text-align:left; font-family:var(--font-jp); font-size:14px; }
.table--history td.count{ font-family:var(--font-mono); }
/* あと1回でチケットが要る（MAX_REOUTPUT-1 回に達した）*/
.table--history td.count.is-full{ color:var(--wine-600); font-weight:600; }

/* --- チケット管理（T）------------------------------------ */
.table--ticket{ min-width:640px; }
.table--ticket th,
.table--ticket td{ padding:8px 10px; }
.table--ticket tbody tr:hover td{ background:rgba(201,169,106,.10); }
/* 決済方法は日本語なので nowrap 側の等幅は効かせない */
.table--ticket td.nowrap + td.nowrap{ font-family:var(--font-jp); font-size:13px; }
.table--ticket td.tid{ font-family:var(--font-mono); font-size:12.5px; color:var(--ink); }
.table--ticket td.num{ font-family:var(--font-mono); font-size:15px; color:var(--ink); }

/* --- チケット取引履歴（V）--------------------------------- */
/* 9列あるので少し詰める。表そのものは .table-wrap が横スクロールする */
.table--ledger{ min-width:880px; font-size:12px; }
.table--ledger th,
.table--ledger td{ padding:7px 8px; }
.table--ledger tbody tr:hover td{ background:rgba(201,169,106,.10); }
.table--ledger td.nowrap{ white-space:nowrap; font-family:var(--font-mono); font-size:11px; color:var(--ink-2); }
.table--ledger td.tid{ font-family:var(--font-mono); font-size:11.5px; color:var(--ink); }
.table--ledger td.name{ text-align:left; font-family:var(--font-jp); font-size:12.5px; white-space:nowrap; }
.table--ledger td.kind{ white-space:nowrap; font-family:var(--font-jp); font-size:12.5px; color:var(--ink-2); }
.table--ledger td.num{ text-align:right; font-family:var(--font-mono); font-size:13px; color:var(--ink); }
/*
  増減。旧デザインは td の背景（緑 #c3f69d / 赤 #f3baca）で示していた。
  見慣れているスタッフがいるので面で塗るのは踏襲し、色は新デザインの
  トークンに寄せて彩度を落としてある。そのうえで符号も出す
  （旧デザインは abs() した値＋色だけで、色が見えないと向きが判らなかった）。
*/
/* 表の種類を問わず使う（取引履歴の増減／カード取引履歴の売上・取消）。
   旧デザインも同じ .green / .red を両画面で使い回していた */
.table td.is-plus{
  background:rgba(53,102,110,.16);
  color:var(--teal-900);
  font-weight:600;
}
.table td.is-minus{
  background:rgba(152,40,95,.15);
  color:var(--wine-700);
  font-weight:600;
}
/* 行ホバーの背景に負けないよう、色付きセルだけ上書きし直す */
.table tbody tr:hover td.is-plus{ background:rgba(53,102,110,.24); }
.table tbody tr:hover td.is-minus{ background:rgba(152,40,95,.22); }

/* --- チケット購入履歴（J）--------------------------------- */
/* 会員が見る画面なので .table--gmo より1段大きい字にしてある */
.table--purchase{ min-width:680px; }
.table--purchase th,
.table--purchase td{ padding:8px 10px; }
.table--purchase tbody tr:hover td{ background:rgba(201,169,106,.10); }
.table--purchase td.nowrap{ white-space:nowrap; font-family:var(--font-mono); font-size:11.5px; color:var(--ink-2); }
.table--purchase td.kind{ white-space:nowrap; font-family:var(--font-jp); font-size:13px; color:var(--ink-2); }
.table--purchase td.num{ text-align:right; font-family:var(--font-mono); font-size:14px; color:var(--ink); }
.table--purchase td.yen{ text-align:right; font-family:var(--font-mono); font-size:14px; white-space:nowrap; color:var(--ink); }
/* 銀行振込は空欄（オーダーIDが無い）*/
.table--purchase td.order{ font-family:var(--font-mono); font-size:11.5px; color:var(--ink-2); }
.table--purchase td.state{ white-space:nowrap; font-family:var(--font-jp); font-size:13px; }

/* --- カード取引履歴（G）----------------------------------- */
.table--gmo{ min-width:760px; font-size:12px; }
.table--gmo th,
.table--gmo td{ padding:7px 8px; }
.table--gmo tbody tr:hover td{ background:rgba(201,169,106,.10); }
.table--gmo td.nowrap{ white-space:nowrap; font-family:var(--font-mono); font-size:11px; color:var(--ink-2); }
.table--gmo td.tid{ font-family:var(--font-mono); font-size:11.5px; color:var(--ink); }
.table--gmo td.num{ text-align:right; font-family:var(--font-mono); font-size:13px; color:var(--ink); }
.table--gmo td.yen{ text-align:right; font-family:var(--font-mono); font-size:13px; white-space:nowrap; color:var(--ink); }
.table--gmo td.state{ white-space:nowrap; font-family:var(--font-jp); font-size:12.5px; }
/* オーダーIDは取引状態参照へのリンク */
.table--gmo td.order a{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--teal-700);
  text-decoration:none;
  border-bottom:1px dotted var(--gold);
}
.table--gmo td.order a:hover{ color:var(--wine-600); border-bottom-color:var(--wine-600); }

/* 取引状態参照（GS）。GMO の応答をそのまま並べるだけ */
.facts--kv > dt{ font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; }
.facts--kv > dd{ font-family:var(--font-mono); font-size:13px; word-break:break-all; }

/* --- クレジットカード情報（e）------------------------------ */
.table--card{ min-width:560px; }
.table--card th,
.table--card td{ padding:9px 10px; }
.table--card tbody tr:hover td{ background:rgba(201,169,106,.10); }
/* 番号は決済代行会社が返すマスク済みの文字列（**** **** **** 1234）*/
.table--card td.cardno{ font-family:var(--font-mono); font-size:13px; letter-spacing:.04em; color:var(--ink); }
.table--card td.expire{ font-family:var(--font-mono); font-size:13px; color:var(--ink-2); }
.table--card td.holder{ text-align:left; font-family:var(--font-mono); font-size:12.5px; color:var(--ink-2); }

/*
  カード入力欄。#any-wrapper-id1..3 の中身は GMO の gmotoken.js が
  iframe で差し込むので、こちらが持てるのは外枠だけ。
  iframe 側の行の高さが 28px なので、枠は上下 8px で 44px 前後になる。
*/
.card-form{ display:flex; flex-direction:column; gap:16px; max-width:520px; }
.card-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:560px){ .card-row{ grid-template-columns:1fr; } }
.card-field__label{
  display:block;
  margin-bottom:6px;
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}
.card-field__box,
.card-field__input{
  box-sizing:border-box;
  width:100%;
  min-height:44px;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:2px;
  background:var(--surface);
}
.card-field__input{
  font-family:var(--font-body);
  font-size:16px;          /* iOS の自動ズーム回避 */
  color:var(--ink);
  outline:none;
}
.card-field__input:focus{ border-color:var(--teal-700); }
.card-field__input::placeholder{ color:var(--muted); letter-spacing:.06em; }

/* --- ログ表示（r1 / r2）----------------------------------- */
/*
  スーパーユーザ専用の別窓。窓いっぱいに使いたいので .popup ではなく
  専用のレイアウトにする。本文は暗い面（等幅・折り返しあり）。
*/
.logbody{ height:100vh; margin:0; background:var(--teal-900); }
.logview{
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  height:100vh;
  padding:14px 16px 16px;
}
.logview__head{
  display:flex;
  align-items:baseline;
  gap:12px;
  flex:0 0 auto;
  padding-bottom:10px;
  border-bottom:1px solid rgba(201,169,106,.35);
}
.logview__head .eyebrow{ margin:0; color:var(--gold); }
.logview__title{
  margin:0;
  font-family:var(--font-jp);
  font-size:16px;
  font-weight:500;
  letter-spacing:.06em;
  color:#F4F1EC;
}
/* 受信状態。色だけで判らないよう文字も出す */
.log-state{
  margin-left:auto;
  padding:2px 10px;
  border:1px solid currentColor;
  border-radius:999px;
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.08em;
}
.log-state--wait{ color:var(--gold); }
.log-state--on{ color:#8FC7A8; }
.log-state--err{ color:#E08AA8; }
.logview__body{
  flex:1 1 auto;
  margin-top:12px;
  padding:12px 14px;
  overflow-y:auto;
  background:#0B1A1E;
  border:1px solid rgba(201,169,106,.22);
  font-family:var(--font-mono);
  font-size:12px;
  line-height:1.55;
  color:#CFE0DF;
}
.log-line{ white-space:pre-wrap; word-break:break-all; }
.log-line--err{ color:#E08AA8; }

/* --- アカウント管理（a / A / E）--------------------------- */
/* 9列あるので詰める。表そのものは .table-wrap が横スクロールする */
.table--users{ min-width:900px; font-size:12px; }
.table--users th,
.table--users td{ padding:7px 8px; }
.table--users tbody tr:hover td{ background:rgba(201,169,106,.10); }
.table--users td.tid{ text-align:left; font-family:var(--font-mono); font-size:12px; color:var(--ink); }
.table--users td.num{ text-align:right; font-family:var(--font-mono); font-size:12.5px; color:var(--ink); }
/* 資格・ユーザレベルは数字。名称は title= に入っているので合図を出す */
.table--users td.lv{
  font-family:var(--font-mono);
  font-size:13px;
  color:var(--ink);
  cursor:help;
  border-bottom:1px dotted var(--gold);
}
.table--users td.exp{ font-family:var(--font-mono); font-size:11.5px; color:var(--ink-2); white-space:nowrap; }
.table--users td.exp--none{ font-family:var(--font-jp); color:var(--muted); }
.table--users td.name{ text-align:left; font-family:var(--font-jp); font-size:12.5px; }

/* アカウントの入力欄。.field のフローティングラベルではなく素の欄 */
.a-input{
  box-sizing:border-box;
  width:100%;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:2px;
  background:var(--surface);
  font-family:var(--font-body);
  font-size:16px;          /* iOS の自動ズーム回避 */
  color:var(--ink);
  outline:none;
}
.a-input:focus{ border-color:var(--teal-700); }
.a-input[readonly]{ background:rgba(227,222,213,.35); color:var(--ink-2); }
.a-input[type="number"]{ font-family:var(--font-mono); text-align:right; }
.f--wide{ flex:1 1 100%; }
/* 破棄の操作は臙脂の枠で他と区別する */
.btn--danger{
  margin-left:auto;
  border-color:var(--wine-600);
  background:transparent;
  color:var(--wine-600);
}
.btn--danger:hover{ background:var(--wine-600); color:#fff; }

/* --- チケット購入（t / t1 / t2）--------------------------- */
/* 枚数と税込金額を1行に並べる */
.buy-row{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:20px;
}
.buy-count{ display:flex; align-items:center; gap:8px; }
.buy-count input{
  box-sizing:border-box;
  width:110px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:2px;
  background:var(--surface);
  font-family:var(--font-mono);
  font-size:16px;          /* iOS の自動ズーム回避 */
  text-align:right;
  color:var(--ink);
  outline:none;
}
.buy-count input:focus{ border-color:var(--teal-700); }
/* 数字だけを見せたいのでブラウザ既定のスピナーは消す */
.buy-count input::-webkit-outer-spin-button,
.buy-count input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.buy-count input{ -moz-appearance:textfield; }
.buy-count__unit{ font-family:var(--font-jp); font-size:14px; color:var(--ink-2); }
.buy-total{
  display:flex;
  align-items:baseline;
  gap:12px;
  margin-left:auto;
  padding-bottom:10px;
}
.buy-total__label{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}
.buy-total__yen{
  font-family:var(--font-mono);
  font-size:22px;
  color:var(--wine-700);
}
.buy-hint{ margin:12px 0 0; font-size:12px; color:var(--muted); }
/* 登録済みカードの選択列（チケット購入のときだけ出る）*/
.table--card td.pick{ width:56px; }
.table--card td.pick input{ width:16px; height:16px; accent-color:var(--wine-600); cursor:pointer; }
/* 振込先。左の見出しを詰める */
.facts--bank > dt{ font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; }
.facts--bank > dd{ font-family:var(--font-jp); font-size:14px; }

/*
  処理中のオーバーレイ（pps_busy）。GMO への照会・登録・削除で
  数秒待たされる間に出す。旧デザインの confirm.css のモーダルの代わり。
*/
.busy{
  position:fixed;
  inset:0;
  z-index:120;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(16,38,43,.55);
}
.busy[hidden]{ display:none; }
.busy__box{
  width:100%;
  max-width:340px;
  padding:32px 28px;
  border-top:2px solid var(--gold);
  background:var(--surface);
  box-shadow:0 18px 50px rgba(16,38,43,.28);
  text-align:center;
}
.busy__spinner{
  display:block;
  width:34px; height:34px;
  margin:0 auto 18px;
  border:2px solid var(--line);
  border-top-color:var(--wine-600);
  border-radius:50%;
  animation:busy-spin 900ms linear infinite;
}
@keyframes busy-spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){
  .busy__spinner{ animation-duration:2400ms; }
}
.busy__title{
  margin:0 0 6px;
  font-family:var(--font-jp);
  font-size:15px;
  color:var(--ink);
}
.busy__text{ margin:0; font-size:12.5px; color:var(--muted); }

/* アイコンだけのボタン（再出力・削除）*/
.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px; height:32px;
  padding:0;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--teal-700);
  cursor:pointer;
  transition:background .15s, border-color .15s, color .15s;
}
.icon-btn svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.icon-btn:hover{ background:rgba(53,102,110,.09); border-color:var(--teal-500); }
.icon-btn:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
.icon-btn--del{ color:var(--muted); }
.icon-btn--del:hover{ background:rgba(128,32,80,.08); border-color:var(--wine-600); color:var(--wine-600); }
/* 承認（チケット管理）。削除と並ぶので色で役割を分ける */
.icon-btn--ok{ color:var(--teal-700); }
.icon-btn--ok:hover{ background:rgba(53,102,110,.12); border-color:var(--teal-700); color:var(--teal-900); }

/* ページャ */
.pager{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:18px;
}
.pager__btn{
  min-width:46px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--ink-2);
  font-size:12px;
  letter-spacing:.06em;
  cursor:pointer;
}
.pager__btn:hover:not([disabled]){ background:rgba(53,102,110,.08); border-color:var(--teal-500); }
.pager__btn[disabled]{ opacity:.35; cursor:default; }
.pager__at{
  min-width:64px;
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.14em;
  color:var(--muted);
  text-align:center;
}

/* 中身が無いときの1行 */
.empty{
  margin:0;
  padding:26px 0;
  text-align:center;
  font-size:13.5px;
  color:var(--muted);
}

@media (max-width:900px){
  .meishiki{ grid-template-columns:max-content 1fr; }
  .meishiki > dd{ padding-right:0; }
}
@media (max-width:640px){
  .block{ padding:20px 18px 22px; }
  .facts{ grid-template-columns:1fr; }
  .facts > dt{ padding:12px 0 0; border-top:1px solid var(--line-soft); }
  .facts > dd{ padding:2px 0 12px; border-top:0; }
  .facts > dd:first-of-type{ padding-top:2px; }
}

/* ---- データベースバックアップ（command=B・スーパーユーザ。2026-11-17）---- */
.table--backup td.tbl{ font-family:var(--font-mono); font-size:12.5px; color:var(--muted); }
.table--backup td.num{ text-align:right; font-family:var(--font-mono); font-size:14px; color:var(--ink); }
.table--backup th:last-child{ text-align:right; }
.table--backup tfoot td{ font-weight:600; border-top:1px solid var(--line); }
.notice code{ font-family:var(--font-mono); font-size:.92em; background:rgba(201,169,106,.12); padding:1px 5px; border-radius:3px; word-break:break-all; }
.notice p:not(.notice__title) + p{ margin-top:8px; }

/* ---- メンテナンスモード（command=M・管理者。2026-11-17）---- */
.nav__badge{
  margin-left:auto; padding:1px 7px; border-radius:99px;
  background:var(--wine-600); color:#fff;
  font-family:var(--font-mono); font-style:normal; font-size:9.5px; letter-spacing:.12em;
}
.nav a span:has(.nav__badge){ display:flex; align-items:center; gap:8px; flex:1; }
.maint-banner a{ color:inherit; font-weight:600; margin-left:8px; text-decoration:underline; }
.maint-state{ display:inline-block; padding:2px 10px; border-radius:99px; font-size:13px;
  background:rgba(53,102,110,.12); color:var(--teal-700); }
.maint-state--on{ background:rgba(128,32,80,.12); color:var(--wine-700); font-weight:600; }
.block.maint{ text-align:center; padding-top:34px; padding-bottom:34px; }
.maint__since{ margin:18px 0 0; font-family:var(--font-mono); font-size:12.5px; color:var(--muted); }
.maint__admin{ margin:26px 0 0; text-align:center; font-size:12px; }
.maint__admin a{ color:var(--muted); }
/* メンテナンス画面のお知らせ文（2026-11-17）*/
.block.maint-notice{ margin-top:18px; }
.maint-notice__body{ margin:0; line-height:1.9; white-space:normal; overflow-wrap:anywhere; }
.maint-notice__hint{ margin:0 0 12px; font-size:13px; color:var(--muted); line-height:1.8; }
.maint-notice__hint code{ font-family:var(--font-mono); font-size:12px; }
.maint-notice__input{ display:block; width:100%; box-sizing:border-box; min-height:132px; padding:12px 14px;
  font:inherit; font-size:16px; line-height:1.8; color:var(--ink); background:var(--surface);
  border:1px solid var(--line); border-radius:8px; resize:vertical; }
.maint-notice__input:focus{ outline:none; border-color:var(--teal-500); box-shadow:0 0 0 3px rgba(53,102,110,.15); }
.maint-notice__foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0 14px; }
.maint-notice__foot .btn{ width:auto; }
.maint-notice__count{ font-family:var(--font-mono); font-size:12px; color:var(--muted); }
.maint-notice__count.is-over{ color:var(--wine-600); font-weight:600; }
.maint-saved{ margin:0 0 10px; font-size:13px; color:var(--teal-700); font-weight:600; }
