/* Gazebo theme（style.css の上に重ねる見た目レイヤー・スマホファースト） */
:root {
  --red: #4a6b5a; --red-dark: #3a5647; --red-hover: #3f5d4d; --red-pale: #e6efe9;
  --navy: #fffdf9; --navy-dark: #f3eee4;
  --ink: #2b2a26; --muted: #7d786f; --bg: #f7f4ee; --card: #ffffff; --line: #e9e3d8;
  --accent: #d98c4f; --accent-pale: #fbeee2; --accent-ink: #7a4a1e;
  --shadow: 0 2px 12px rgba(70, 60, 40, .07);
  --radius: 18px;
  --brand-band: #3a5647; --accent-ink: #7a4a1e;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-head: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
}
html[data-theme="dark"], html[data-theme="auto"] { --navy: #1b1f24; --navy-dark: #14171c; --accent: #e3a06a; --accent-pale: #3a2d1f; --accent-ink: #f0c490; --shadow: 0 2px 12px rgba(0,0,0,.35); --line: #343b46; --bg: #14171c; --card: #1d222a; --ink: #e9e6ea; --muted: #98929e; --red: #7fb596; --red-dark: #a9d2bb; --red-hover: #5f9a78; --red-pale: #243128; }
@media (prefers-color-scheme: light) { html[data-theme="auto"] { --navy: #fffdf9; --navy-dark: #f3eee4; --accent: #d98c4f; --accent-pale: #fbeee2; --accent-ink: #7a4a1e; --shadow: 0 2px 12px rgba(70,60,40,.07); --line: #e9e3d8; --bg: #f7f4ee; --card: #ffffff; --ink: #2b2a26; --muted: #7d786f; --red: #4a6b5a; --red-dark: #3a5647; --red-hover: #3f5d4d; --red-pale: #e6efe9; } }

body { font-family: var(--font-body); font-size: 16px; line-height: 1.7; letter-spacing: .01em; font-weight: 400; -webkit-font-smoothing: antialiased; }
strong, b { font-weight: 700; }
.muted { color: #6f6a61; }
html[data-theme="dark"] .muted, html[data-theme="auto"] .muted { color: var(--muted); }
h1, h2, h3, .topbar .brand, .login-wrap h1, .att-tile .n, .cal-nav strong { font-family: var(--font-head); }
h1 { font-size: 22px; margin: 4px 0 14px; letter-spacing: .02em; line-height: 1.4; font-weight: 800; }
h2 { font-size: 15px; margin: 28px 0 10px; text-transform: none; letter-spacing: .04em; border-left: 0; padding-left: 16px; position: relative; color: var(--ink); }
h2::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.muted { font-size: 13.5px; }

/* header */
.site-header { box-shadow: 0 1px 0 var(--line); }
.topbar { background: var(--brand-band); color: #fff; padding: 10px 14px; min-height: 56px; }
.topbar .brand { color: #fff; font-size: 17px; letter-spacing: .04em; font-weight: 700; }
.topbar .brand img, .topbar .brand svg { width: 36px; height: 36px; border-radius: 12px; }
.topbar nav a { color: #fff; opacity: .85; font-size: 14px; }
.topbar nav > a:hover { background: rgba(255,255,255,.18); color: #fff; opacity: 1; }
/* ヘッダーのアイコンボタン（教室切替・歯車）は同じ大きさの丸に揃える */
.topbar nav .kebab-wrap > a { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 18px; opacity: .95; }
.topbar nav .kebab-wrap > a:hover { background: rgba(255,255,255,.18); color: #fff; }
.dropdown, .nav-dropdown { border-radius: 14px; box-shadow: var(--shadow); border-color: var(--line); }
.topbar nav .nav-dropdown .mgrp { padding: 7px 15px 6px; font-size: 10.5px; font-weight: 800; color: var(--red-dark); letter-spacing: .09em; background: var(--red-pale); border-bottom: 1px solid var(--line); }
.topbar nav .nav-dropdown a .muted { color: var(--red-dark); opacity: .85; }
@media (max-width: 760px) {
  .topbar nav > a:not(.team-switch-btn) { display: none; }
  .topbar nav .kebab-wrap > a { font-size: 20px; }
}

/* 保存・送信の結果を画面の下に出す（押したボタンの近くで気づけるように） */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 200; display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px); padding: 13px 22px; border-radius: 999px; background: #2f6b49; color: #fff; font-size: 14px; font-weight: 700; line-height: 1.6; box-shadow: 0 10px 28px rgba(20,30,24,.30); opacity: 0; transform: translateX(-50%) translateY(14px); transition: opacity .25s ease, transform .25s ease; cursor: pointer; }
.toast.err { background: #b3261e; box-shadow: 0 10px 28px rgba(60,16,12,.32); }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast i { font-size: 15px; flex: 0 0 auto; }
@media (max-width: 760px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom)); font-size: 13.5px; padding: 12px 18px; } }

/* 日付ピッカー（flatpickr）。アプリ側の input/select の指定がそのまま効いて、
   年月の見出しが潰れ、プルダウンの矢印が文字に重なるため、この中だけ打ち消す。
   flatpickr のCSSは実行時に後から読み込まれるので !important が要る */
.flatpickr-calendar select,
.flatpickr-calendar input { width: auto !important; min-height: 0 !important; height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; background-image: none !important; box-shadow: none !important; outline: none !important; font-size: 15px !important; font-weight: 700 !important; color: inherit !important; line-height: 1.4 !important; }
.flatpickr-calendar .flatpickr-monthDropdown-months { padding-right: 2px !important; }
.flatpickr-calendar input.cur-year { width: 4.4ch !important; text-align: left !important; }
.flatpickr-calendar .numInputWrapper { width: auto !important; }
.flatpickr-months { padding: 2px 0 !important; }
.flatpickr-months .flatpickr-month { height: 44px !important; overflow: visible !important; }
.flatpickr-current-month { height: 44px !important; padding: 0 !important; display: flex !important; align-items: center !important; justify-content: center !important; gap: 3px !important; font-size: 15px !important; }
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month { height: 44px !important; padding: 13px 10px !important; }

/* bottom tab bar（スマホ） */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -5px 16px rgba(70,60,40,.13); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; color: var(--ink); opacity: .55; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 4px 0 2px; position: relative; text-decoration: none; }
  .tabbar a i { font-size: 20px; }
  .tabbar a.on { color: var(--red); opacity: 1; }
  .tabbar a.on::before { content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
  .tabbar a .nav-badge { top: -2px; right: calc(50% - 20px); }
  .container { padding-bottom: 96px; }
}
.container { padding: 16px 14px 60px; }

/* cards & lists */
.list li, .detail, .card, .invite-box, .parent-box, .answer-form, .survey-form fieldset, fieldset, .q-row, .att-tile, .calendar, .answers, .mcx { border-radius: var(--radius); border-color: transparent; box-shadow: var(--shadow); }
.list li { padding: 13px 16px; margin-bottom: 10px; }
.list li a { font-weight: 700; }
.detail { padding: 16px 18px; }
.detail .dt { font-size: 11.5px; letter-spacing: .06em; }
.card { background: var(--card); padding: 16px 18px; margin: 12px 0; }
.q-row { background: var(--card); border: 0; }
.flash { border-radius: 14px; border: 0; background: var(--red-pale); color: var(--red-dark); padding: 12px 16px; font-weight: 600; }

/* badges */
/* バッジ：意味で5種類。色は必ずここで決め、画面側で style を書かない */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.6; padding: 2px 10px; border-radius: 999px; font-weight: 800; margin-left: 4px; white-space: nowrap; vertical-align: middle; border: 1px solid transparent; }
.badge.ok,     .badge.done      { background: #e6f2ea; color: #2f6b49; border-color: #cfe4d8; }  /* 良好・完了 */
.badge.wait,   .badge.todo      { background: #fdefdc; color: #9a5a00; border-color: #f3dcbb; }  /* 待ち・未完了 */
.badge.warn,   .badge.nocon     { background: #fdeceb; color: #b3261e; border-color: #f3c9c5; }  /* 注意・要対応 */
.badge.info,   .badge.acct-parent { background: #eaf0f8; color: #2b4a8a; border-color: #d3dff0; } /* 情報・属性 */
.badge.mute,   .badge.cancel    { background: #efedea; color: #857f79; border-color: #e2ded9; }  /* 無効・対象外 */
.badge.acct-self { background: #e6f2ea; color: #2f6b49; border-color: #cfe4d8; }
/* LINE連携だけは LINE の色を使う（一目で分かるように） */
.badge.line-on  { background: #06c755; color: #fff; border-color: #06c755; }
.badge.line-off { background: #fff; color: #857f79; border-color: #ddd8d2; }

/* buttons & inputs */
button { border-radius: 14px; min-height: 48px; padding: 12px 16px; font-size: 16px; letter-spacing: .04em; font-weight: 700; box-shadow: 0 2px 6px rgba(74,107,90,.18); }
button.secondary, button.danger { box-shadow: none; background: var(--card); }
button.secondary { border-width: 1.5px; }
.admin-actions a { border-radius: 14px; padding: 13px 8px; font-size: 14px; box-shadow: 0 2px 6px rgba(74,107,90,.18); }
.cal-nav a { border: 0; box-shadow: var(--shadow); padding: 7px 14px; font-size: 13px; }
.cal-nav strong { font-size: 18px; }
input[type=text], input[type=url], input[type=search], input[type=tel], input[type=number], input[type=email], input[type=date], input[type=time], input[type=datetime-local], input[type=month], textarea, select { border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); padding: 12px 13px; font-size: 16px; min-height: 48px; font-family: var(--font-body); font-weight: 400; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--red-pale); border-color: var(--red); }
textarea { line-height: 1.75; padding: 12px 14px; }
input[type=text], input[type=url], input[type=search], input[type=tel], input[type=number], input[type=email] { line-height: 1.6; }
label { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.opt { font-weight: 600; color: var(--ink); }

/* answer buttons */
.answer-btns { gap: 10px; }
.answer-btns .ans { border-radius: 16px; padding: 14px 0; font-size: 16px; border: 2px solid var(--line); background: var(--card); }
.answer-btns .ans.selected, .answer-btns .ans:has(input:checked) { border-color: var(--red); background: var(--red-pale); box-shadow: inset 0 0 0 1px var(--red); }

/* attendance tiles */
.att-summary { gap: 8px; }
.att-tile { padding: 12px 4px 9px; border-radius: 16px; }
.att-tile .n { font-size: 26px; }
.att-tile .l { font-size: 11.5px; }
.att-tile.t-yes { background: #eaf4ee; }
.att-tile.t-no { background: #f1efec; }
.att-tile.t-maybe { background: #fdf1e4; }
.att-tile.t-none { background: var(--card); }
.att-mark { border-radius: 50%; }
.att-mark.wait { font-size: 12.5px; font-weight: 700; letter-spacing: 0; line-height: 27px; -webkit-text-stroke: 0; }
.att-mark.wait[style*="width:20px"], .att-mark.wait[style*="width:18px"] { font-size: 10px; }

/* calendar */
.calendar { border: 0; border-radius: 0; overflow: hidden; }
.calendar th { background: transparent; font-size: 11px; padding: 8px 0 4px; color: var(--muted); border-bottom: 1px solid var(--line); }
.calendar td { height: 64px; border-right: 0; border-bottom: 1px solid var(--line); padding: 4px 3px; }
.calendar td .d { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; font-size: 11px; }
.calendar td.today { background: transparent; }
.calendar td.today .d { background: var(--red); color: #fff; }
.calendar td.empty { background: transparent; }
.ev { border-radius: 8px; padding: 2px 5px; font-size: 10.5px; font-weight: 700; }
.calendar .ev { white-space: normal; word-break: break-all; line-height: 1.25; }
.calendar td { height: auto; min-height: 64px; }
@media (max-width: 760px) {
  .calendar td { min-height: 76px; font-size: 12px; }
  .calendar td .d { font-size: 12px; }
  .ev { font-size: 11px; }
}
.list .ev, h1 .ev, .legend .ev { border-radius: 999px; padding: 1px 9px; font-size: 11px; }
.legend { margin: 10px 2px 0; }

/* tables */
.answers { border: 0; }
.answers th { background: var(--navy-dark); color: var(--muted); font-size: 12px; padding: 9px 10px; }
.answers td { padding: 10px; font-size: 14.5px; }
.sched-matrix th.sticky-col { background: var(--navy-dark); }

/* member cards */
.mcx { box-shadow: var(--shadow); }
.mode-pro .mcx, .mode-junior .mcx { background: linear-gradient(150deg, #5d8a72, #3a5647 55%, #243129); }
.mode-pro .mcx-in, .mode-junior .mcx-in { background: linear-gradient(170deg, #4a6b5a, #2f3f36); }
.mode-pro .mcx-art, .mode-junior .mcx-art { background: radial-gradient(circle at 50% 34%, #5f8f74, #2a3d33 82%); }
.mode-pro .mcx-avatar-none, .mode-junior .mcx-avatar-none { background: #3a5647; color: #a9d2bb; }
.mode-pro .mcx-foot, .mode-junior .mcx-foot { color: #cfe3d6; }

/* login */
.login-wrap { padding: 70px 22px 40px; max-width: 420px; margin: 0 auto; }
.login-wrap .logo-mark { width: 96px; height: 96px; border-radius: 28px; box-shadow: var(--shadow); }
.login-wrap h1 { font-size: 24px; letter-spacing: .08em; color: var(--ink); }

/* misc */
.admin-menu .am-group { gap: 8px; }
.invite-box { background: var(--card); }
.theme-picker button.tp-opt { min-height: 36px; box-shadow: none; }
.proxy-mark, .proxy-btn { min-height: 0; box-shadow: none; border-radius: 8px; }
.kebab { box-shadow: none; min-height: 0; }
footer { font-family: var(--font-body); }

/* ===== v2: 手帳型ホーム・ヒーロー・タイル ===== */
.greet { font-size: 14px; color: var(--muted); margin: 2px 0 10px; }
.greet strong { color: var(--ink); font-weight: 700; }
.hero { display: block; background: var(--card); border-radius: 22px; padding: 14px 16px 16px; box-shadow: var(--shadow); color: var(--ink); margin: 0 0 14px; position: relative; overflow: visible; }
.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--red); border-radius: 22px 0 0 22px; }
.hero .dropdown { z-index: 70; }
.hero.today::before { background: var(--accent); }
.hero.cancelled { opacity: .7; }
.hero.cancelled::before { background: #b5afa9; }
.hero-label .ev, .hero-label .pill { display: inline-block; vertical-align: middle; }
.hero-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; margin-bottom: 8px; }
.hero.today .hero-label { color: var(--accent); }
.hero-body { display: flex; gap: 14px; align-items: flex-start; }
.hero-main { flex: 1; min-width: 0; }
.hero-title { font-family: var(--font-head); font-size: 20px; font-weight: 800; line-height: 1.35; margin-bottom: 4px; }
.hero-meta { font-size: 14px; color: var(--muted); font-weight: 400; }
.hero-meta i { color: var(--red); margin-right: 2px; }
.hero-ans { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.hero-cta { margin-left: auto; color: var(--red); font-size: 14px; }
.hero .kebab-wrap { margin-left: auto; }
.datebox { flex: 0 0 auto; width: 52px; text-align: center; background: var(--bg); border-radius: 14px; padding: 6px 0; line-height: 1.1; }
.datebox .d { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--ink); }
.datebox .w, .datebox .m { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.datebox.big { width: 64px; padding: 8px 0; background: var(--red-pale); }
.datebox.big .d { font-size: 30px; color: var(--red-dark); }
.hero.today .datebox.big { background: var(--accent-pale); }
.hero.today .datebox.big .d { color: #a8622a; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; line-height: 1.6; }
.pill.todo { background: var(--accent-pale); color: #a8622a; }
.pill.done { background: var(--red-pale); color: var(--red-dark); }
.pill.cancel { background: #eeece9; color: #8f8983; }
.pill.muted { background: var(--bg); color: var(--muted); }
.notice-card { display: flex; align-items: center; gap: 10px; background: var(--accent-pale); color: var(--accent-ink); border-radius: 16px; padding: 12px 16px; font-size: 14px; font-weight: 700; margin: 0 0 14px; }
.agenda { display: flex; flex-direction: column; gap: 8px; }
.agenda-month { font-family: var(--font-head); font-size: 13px; font-weight: 800; color: var(--muted); margin: 8px 0 2px 4px; letter-spacing: .06em; }
.agenda-item { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 10px 14px 10px 10px; box-shadow: var(--shadow); color: var(--ink); }
.agenda-item.cancelled { opacity: .6; }
.agenda-item.cancelled .agenda-title { text-decoration: line-through; }
.agenda-main { flex: 1; min-width: 0; }
.agenda-title { font-weight: 700; font-size: 15px; line-height: 1.4; }
.agenda-title .ev { display: inline-block; margin-right: 4px; }
.agenda-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.agenda-state { flex: 0 0 auto; }
details.fold { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 0 14px; margin: 14px 0; }
details.fold summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; font-size: 12px; color: var(--muted); transition: transform .2s; }
details.fold[open] summary::after { transform: rotate(180deg); }
details.fold > *:not(summary) { margin-left: 0; margin-right: 0; }
details.fold[open] { padding-bottom: 14px; }
details.fold .calendar { box-shadow: none; border: 1px solid var(--line); }
details.fold .card { box-shadow: none; border: none; padding-left: 0; padding-right: 0; }
details.fold textarea { margin-top: 8px; }
details.fold-cal { border-radius: 0; padding: 0; }
details.fold-cal summary { padding: 13px 14px; }
details.fold-cal .cal-nav { padding: 0 14px; }
details.fold-cal .legend { padding: 0 14px; margin-top: 10px; }
details.fold-cal[open] { padding-bottom: 14px; }
@media (max-width: 760px) {
  details.fold-cal { margin-left: -14px; margin-right: -14px; box-shadow: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
}
.fab { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 55; display: flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 800; font-size: 15px; padding: 13px 18px 13px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(201,103,59,.35); }
.fab i { font-size: 16px; }
@media (min-width: 761px) { .fab { bottom: 24px; } }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 4px; }
@media (min-width: 761px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--card); border-radius: 18px; padding: 14px 14px 12px; box-shadow: var(--shadow); color: var(--ink); min-height: 96px; }
.tile i { font-size: 20px; color: var(--red); margin-bottom: 6px; background: var(--red-pale); width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tile span { font-weight: 800; font-size: 15px; font-family: var(--font-head); }
.tile small { font-size: 11.5px; color: var(--muted); }
.tile:nth-child(2) i { color: #a8622a; background: var(--accent-pale); }

/* ===== 画像：カルーセル・トリミング欄・サムネイル ===== */
.evimg { border-radius: 16px; overflow: hidden; margin: 0 0 12px; }
.evimg img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.carousel-wrap { margin: 0 0 12px; }
.carousel { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 16px; }
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: 0 0 100%; width: 100%; aspect-ratio: 16/9; object-fit: cover; scroll-snap-align: start; border-radius: 16px; display: block; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.carousel-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.carousel-dots span.on { background: var(--red); }
.carousel-dots span { cursor: pointer; width: 9px; height: 9px; }
.carousel-wrap { position: relative; }
.carousel-arrow { position: absolute; top: calc(50% - 14px); transform: translateY(-50%); width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 15px; box-shadow: none; display: flex; align-items: center; justify-content: center; z-index: 2; }
.carousel-arrow.prev { left: 8px; } .carousel-arrow.next { right: 8px; }
.carousel-arrow:hover { background: rgba(0,0,0,.55); }
.hero .carousel-arrow { top: calc(50% - 20px); }
.hero-thumb { flex: 0 0 auto; width: 88px; height: 66px; border-radius: 12px; object-fit: cover; margin-left: 4px; }
@media (max-width: 400px) { .hero-thumb { width: 72px; height: 54px; } }
.hero .evimg, .hero .carousel-wrap { margin: -14px -16px 12px; }
.hero .evimg, .hero .evimg img, .hero .carousel, .hero .carousel img { border-radius: 22px 22px 0 0; }
.hero .carousel img { border-radius: 22px 22px 0 0; }
.ic-slot { background: var(--bg); border-radius: 14px; padding: 10px 12px; margin: 0 0 10px; }
.ic-current img { display: block; width: 100%; max-width: 320px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }
.ic-file { margin: 6px 0; font-size: 14px; }
.ic-vp { position: relative; width: 100%; max-width: 360px; aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; background: #e6e1d8; touch-action: none; cursor: grab; display: none; }
.ic-slot.picked .ic-vp { display: block; }
.ic-vp .ic-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); text-align: center; padding: 10px; }
.ic-vp.has-img .ic-hint { display: none; }
.ic-zoom { display: none; max-width: 360px; margin-top: 6px; font-size: 12.5px; }
.ic-slot.picked .ic-zoom { display: block; }
.ic-zoom input { width: 100%; min-height: 0; padding: 0; }

/* ===== フォームの見た目（入れ子の枠をなくし、下線スタイルの入力欄に） ===== */
input[type=text], input[type=url], input[type=search], input[type=tel], input[type=number], input[type=email], input[type=date], input[type=time], input[type=datetime-local], input[type=month], textarea, select {
  border: 1px solid var(--line); border-bottom: 2px solid var(--line); border-radius: 10px; background: #fff; box-shadow: none; padding: 13px 14px 11px; margin-bottom: 14px;
}
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select { background: #232933; border-color: #3a424e; border-bottom-color: #4a5462; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] input, html[data-theme="auto"] textarea, html[data-theme="auto"] select { background: #232933; border-color: #3a424e; border-bottom-color: #4a5462; } }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); border-bottom-color: var(--red); background: #fff; box-shadow: 0 0 0 3px var(--red-pale); }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; -webkit-appearance: none; appearance: none; padding-right: 36px; }
label { display: block; font-size: 12.5px; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
label > input, label > textarea, label > select { margin-top: 6px; font-weight: 400; }
label.opt { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink); font-weight: 600; padding: 8px 0; margin: 0; }
label.opt input[type=checkbox], label.opt input[type=radio] { width: 20px; height: 20px; accent-color: var(--red); margin: 0; }
.dt { font-size: 12.5px; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
/* 管理画面：フォームを包む白いカードをやめ、区切り線だけにする */
.admin .answer-form, .admin fieldset, .admin form > .q-row, .admin .q-row { background: transparent; box-shadow: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0 4px; margin: 6px 0 18px; }
.admin h2 { margin-top: 32px; }
.admin h2 + p.muted { margin-bottom: 10px; }
.admin form > button[type=submit], .admin .answer-form > button[type=submit] { margin-top: 6px; }
.admin .ic-slot { background: #faf7f1; }
.admin .invite-box { background: #faf7f1; box-shadow: none; }
.ic-square .ic-vp { aspect-ratio: 1/1; max-width: 220px; border-radius: 50%; }
.ic-square .ic-current img { aspect-ratio: 1/1; max-width: 140px; border-radius: 50%; }
.ic-square .ic-zoom { max-width: 220px; }

/* ===== 募集ページ設定などのブロック構成 ===== */
.acc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.acc-tabs a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.acc-tabs a.on { border-color: var(--red); color: var(--red); background: var(--red-pale); }
.blk { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 16px 18px 14px; margin: 0 0 16px; }
.blk-head { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.blk-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.blk-title { font-family: var(--font-head); font-weight: 800; font-size: 16px; line-height: 1.4; }
.blk-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.blk-sub { font-family: var(--font-head); font-weight: 800; font-size: 14px; margin: 18px 0 8px; padding-left: 10px; border-left: 3px solid var(--red); }
.blk .answer-form, .admin .blk .answer-form, .admin .blk .q-row { border-top: 0; padding-top: 0; margin-top: 0; }
.blk .dt { margin-top: 8px; }
.savebar { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 30; padding: 8px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
@media (min-width: 761px) { .savebar { bottom: 0; } }
.blk-head > div:only-child { flex: 1; }
.blk .att-summary { margin-top: 4px; }
.blk .list li { box-shadow: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); margin-bottom: 0; padding-left: 0; padding-right: 0; }
.blk .list li:last-child { border-bottom: 0; }
.blk .answers { box-shadow: none; border: 0; border-radius: 0; }
