/*
 * 画面の見た目(デザイン案A: 落ち着いた上品な雰囲気)。
 * color.css(基本色 --base-color など)の「後」に読み込み、色・余白・角丸・影だけを上書きする。
 * レイアウト(配置・並び)は変えない。やめるときは、layout/default.php の theme.css の1行を消すだけ。
 */
:root {
    --ink:   #2B2B3A;
    --muted: #6B6B80;
    --line:  #E3E3EE;
    --bg:    #F6F6FA;
    --tint:  #ECECF7;   /* 基本色の薄い色(下の @supports で、基本色から自動計算) */
    --shadow: 0 2px 10px rgba(60, 60, 110, .07);
}
@supports (color: color-mix(in srgb, red, blue)) {
    :root { --tint: color-mix(in srgb, var(--base-color) 12%, #fff); }
}

body { background:var(--bg); color:var(--ink); font-family:"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Noto Sans JP",Meiryo,sans-serif; line-height:1.75; letter-spacing:.02em; -webkit-font-smoothing:antialiased; }
a { color:var(--base-color); }
a:hover { color:var(--deep-color); }

/* ヘッダー */
.expanded.top-bar, .expanded.top-bar .title-area, .top-bar-section ul li, .top-bar-section #menu>li>a { background-color:#fff !important; }
.expanded.top-bar { border-bottom:0 !important; box-shadow:0 1px 0 var(--line), 0 4px 14px rgba(60, 60, 110, .06); }
.top-bar-section #menu>li>a { border-radius:10px; transition:background .15s; }
.top-bar-section #menu>li>a:hover { background-color:var(--tint) !important; color:var(--base-color); }

/* 見出し */
h1 { background:none !important; color:var(--ink) !important; font-size:1.45rem; font-weight:700; padding:.2rem 0 .7rem !important; margin:1.2rem 0 1rem; border-bottom:3px solid var(--base-color); letter-spacing:.04em; }
legend { background:none !important; color:var(--ink) !important; font-size:1.45rem; font-weight:700; padding:.2rem 0 .7rem !important; margin:1.2rem 0 1rem; border-bottom:3px solid var(--base-color) !important; width:100%; letter-spacing:.04em; }

/* 一覧の表(見出しの行+データの行): 外枠を丸く、見出しの行を基本色に */
table { border:1px solid var(--line) !important; border-radius:14px; border-collapse:separate !important; border-spacing:0; overflow:hidden; background:#fff; box-shadow:var(--shadow); }
table th { background:var(--base-color) !important; color:#fff !important; font-weight:600; border:0 !important; padding:.8rem .5rem; letter-spacing:.06em; }
table td { border:0 !important; border-top:1px solid var(--line) !important; padding:.75rem .6rem; background:#fff; }
table tr:first-child td { border-top:0 !important; }
table tr:hover td { background:#FAFAFE; }

/*
 * 入力画面の表(左に項目名の th、右に入力欄の td): 項目ごとに、別々の枠(カード)にして、境界をはっきりさせる。
 * 項目の間に、すきまを空け、項目名(基本色)と入力欄(白)の間にも、区切りをつける。
 * (:has に対応しないブラウザでは、上の一覧の表と同じ見た目になる)
 */
table:has(th + td) { border:0 !important; background:transparent; box-shadow:none; overflow:visible; border-spacing:0 7px; }
table:has(th + td) tr:hover td { background:#fff; }
table:has(th + td) th[colspan] { border-radius:12px; text-align:center; padding:.7rem .5rem; box-shadow:var(--shadow); }
table:has(th + td) th:not([colspan]) { border-radius:12px 0 0 12px; border-right:3px solid #fff !important; box-shadow:var(--shadow); }
table:has(th + td) th + td { border:1px solid var(--line) !important; border-left:0 !important; border-radius:0 12px 12px 0; box-shadow:var(--shadow); padding:.8rem .9rem; }

/* 入力・選択 */
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], textarea, select { border:1px solid #D5D5E4 !important; border-radius:10px !important; background:#fff !important; box-shadow:none !important; padding:.55rem .8rem; transition:border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color:var(--base-color) !important; box-shadow:0 0 0 3px rgba(95, 93, 166, .18) !important; outline:0; }

/* ボタン */
.button, button, input[type=submit] { background:var(--base-color) !important; color:#fff !important; border:0 !important; border-radius:999px !important; padding:.75rem 2.2rem !important; font-weight:600; letter-spacing:.08em; box-shadow:0 4px 12px rgba(95, 93, 166, .28); transition:transform .12s, box-shadow .12s, background .12s; }
.button:hover, button:hover, input[type=submit]:hover { background:var(--deep-color) !important; transform:translateY(-1px); box-shadow:0 6px 16px rgba(95, 93, 166, .34); }

/* 丸い写真 */
.profile-photo { border-radius:50%; box-shadow:0 2px 10px rgba(60, 60, 110, .18); }

/* 入力画面(div形式の表): 項目ごとに、別々の枠にして、すきまを空ける */
.table-div { border:0 !important; background:transparent; box-shadow:none; overflow:visible; }
.tr-div { margin-bottom:7px; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; box-shadow:var(--shadow); }
.th-div { background:var(--base-color) !important; color:#fff !important; font-weight:600; border:0 !important; letter-spacing:.05em; }
.td-div { background:#fff !important; border:0 !important; }
.tr-div:first-of-type .th-div, .tr-div:first-of-type .td-div, .tr-div:last-of-type .th-div { border-radius:0 !important; }
@media screen and (min-width: 721px) {
    .tr-div .th-div { border-right:3px solid #fff !important; }
}

/*
 * スマホ幅(720px以下)の入力画面: 項目名を上に、入力欄を下に、縦に並べる。各項目は、1つの枠(カード)にまとめる。
 * 項目名が横幅の一部しか使わず、入力欄が、はみ出すことを防ぐ。
 */
@media screen and (max-width: 720px) {
    /* 中身(エディタなど)が広くても、画面幅からはみ出さない */
    fieldset { min-width:0 !important; max-width:100%; }
    /* ログインなどの、枠(.box)の二重線をなくす */
    .box, .box2 { padding:0 !important; background:transparent !important; box-shadow:none !important; border:0 !important; }

    /* div形式の表: 項目名の帯を、枠の幅いっぱいに。入力欄も、いっぱいに */
    .tr-div .th-div, .tr-div .td-div { width:100% !important; box-sizing:border-box; border-radius:0 !important; }
    .tr-div .th-div { padding:.55rem .9rem !important; text-align:left; border-right:0 !important; }
    .tr-div .td-div { padding:.7rem .9rem !important; left:0; }
    .tr-div .input-div { height:auto; line-height:1.5; }
    .tr-div .td-div input[type=text], .tr-div .td-div input[type=password], .tr-div .td-div input[type=email] { width:100%; margin:0; box-sizing:border-box; }

    /* 本文のエディタ(nicEdit)は、画面幅に合わせる(JSが、PC用の固定幅を付けるため) */
    div:has(> .nicEdit-panelContain), div:has(> .nicEdit-main), div:has(> div > .nicEdit-main), .nicEdit-panelContain, .nicEdit-main { width:100% !important; max-width:100% !important; box-sizing:border-box; }

    /* 表形式の入力画面: 縦に並べる */
    table:has(th + td), table:has(th + td) tbody { display:block; width:100%; }
    table:has(th + td) tr { display:block; margin-bottom:7px; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; box-shadow:var(--shadow); }
    table:has(th + td) tr:has(> th[colspan]) { border:0; background:transparent; box-shadow:none; }
    table:has(th + td) th[colspan] { display:block; width:100% !important; box-sizing:border-box; }
    table:has(th + td) th:not([colspan]) { display:block; width:100% !important; box-sizing:border-box; border-radius:0; border-right:0 !important; text-align:left; padding:.5rem .9rem; box-shadow:none; }
    table:has(th + td) th + td { display:block; width:100% !important; box-sizing:border-box; border:0 !important; border-radius:0; box-shadow:none; padding:.7rem .9rem; overflow-x:auto; }
    table:has(th + td) td input[type=text], table:has(th + td) td input[type=password], table:has(th + td) td input[type=email], table:has(th + td) td input[type=tel], table:has(th + td) td textarea, table:has(th + td) td select { max-width:100%; box-sizing:border-box; }
}
