/* イベントモニター 共通スタイル（ページ別 → iPhone 風レイヤーの順。後ろほど優先） */
html { scrollbar-gutter: stable; }
/* ── page: login ── */
body:where(.pg-login), :where(body.pg-login) * {box-sizing: border-box; margin: 0; padding: 0;}
body:where(.pg-login) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd;
       min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;}
:where(body.pg-login) .box {width: 100%; max-width: 340px; background: #1a1a2e; border: 1px solid #2a2a45;
       border-radius: 14px; padding: 24px 20px;}
:where(body.pg-login) h1 {font-size: 1.05rem; color: #8888ff; margin-bottom: 18px; text-align: center;}
:where(body.pg-login) label {display: block; font-size: 0.75rem; color: #888; margin-bottom: 5px;}
:where(body.pg-login) input {width: 100%; padding: 12px 14px; background: #1e1e35; border: 1px solid #3a3a60;
        border-radius: 10px; color: #ddd; font-size: 1rem; outline: none; -webkit-appearance: none;
        margin-bottom: 14px;}
:where(body.pg-login) input:focus {border-color: #5865F2;}
:where(body.pg-login) button {width: 100%; padding: 13px 0; background: #5865F2; color: #fff; border: none;
         border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
         -webkit-tap-highlight-color: transparent;}
:where(body.pg-login) .err {background: #3a1a1a; border: 1px solid #5a2a2a; color: #d07070; border-radius: 10px;
       padding: 10px 12px; font-size: 0.8rem; line-height: 1.5; margin-bottom: 14px;}

/* ── page: index ── */
body:where(.pg-index), :where(body.pg-index) * {box-sizing: border-box; margin: 0; padding: 0;}
html {scrollbar-gutter: stable;}
body:where(.pg-index) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; padding-bottom: 80px; min-height: 100vh;}
:where(body.pg-index) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-index) .tabs {display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px;}
:where(body.pg-index) .tab {padding: 7px 2px; border-radius: 10px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.72rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;}
:where(body.pg-index) .tab.active {background: #5865F2; color: #fff;}
:where(body.pg-index) .tab.fav-tab.active {background: #7a5f00;}
:where(body.pg-index) .tab-cnt {font-size: 0.65rem; color: #555; line-height: 1; min-height: 0.9em;}
:where(body.pg-index) .tab.active .tab-cnt {color: rgba(255,255,255,0.6);}
:where(body.pg-index) .search-wrap {position: relative; margin-bottom: 12px;}
:where(body.pg-index) .search-wrap input {width: 100%; padding: 10px 36px 10px 14px; background: #1e1e35; border: 1px solid #3a3a60; border-radius: 10px; color: #ddd; font-size: 0.9rem; outline: none; -webkit-appearance: none;}
:where(body.pg-index) .search-wrap input::placeholder {color: #555;}
:where(body.pg-index) .search-wrap .clear {position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #555; font-size: 1rem; cursor: pointer; display: none; border: none; background: none; padding: 4px;}
:where(body.pg-index) .no-results {text-align: center; color: #555; padding: 30px 0; font-size: 0.9rem; display: none;}
:where(body.pg-index) .select-bar {display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 0.82rem; color: #888;}
:where(body.pg-index) .select-bar label {display: flex; align-items: center; gap: 6px; cursor: pointer;}
:where(body.pg-index) .card {background: #1a1a2e; border-radius: 12px; padding: 14px; margin-bottom: 10px; border: 1px solid #2a2a45; position: relative; overflow: hidden; transition: transform 0.15s, background 0.15s; touch-action: pan-y;}
:where(body.pg-index) .card.v-keep {border-left: 3px solid #2d8a5a;}
:where(body.pg-index) .card.v-skip {border-left: 3px solid #8a2d2d; opacity: 0.6;}
:where(body.pg-index) .card.v-fav {border-left: 3px solid #c8a000;}
:where(body.pg-index) .card-inner {display: flex; gap: 10px; align-items: flex-start;}
:where(body.pg-index) .item-check {width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; accent-color: #5865F2; cursor: pointer;}
:where(body.pg-index) .card-body {flex: 1; min-width: 0;}
:where(body.pg-index) .card-meta {display: flex; gap: 5px; margin-bottom: 7px; flex-wrap: wrap; align-items: center;}
:where(body.pg-index) .tag {background: #252545; border-radius: 10px; padding: 2px 8px; font-size: 0.72rem; color: #999;}
:where(body.pg-index) .rec-tag {background: #3a2410; color: #f0a860;}
:where(body.pg-index) .date-tag2 {background: #1a2a3a; color: #70a8d0;}
:where(body.pg-index) .cand-form {margin: 8px 0 0;}
:where(body.pg-index) .btn-cand {width: 100%; padding: 8px 0; background: #1a2a3a; color: #70a8d0; border: 1px solid #2a4a6a; border-radius: 10px; font-size: 0.82rem; font-weight: 600; cursor: pointer;}
:where(body.pg-index) .flash {background: #1a3a28; color: #70d090; border: 1px solid #2a5a38; border-radius: 10px; padding: 9px 12px; font-size: 0.82rem; margin-bottom: 10px;}
:where(body.pg-index) .filter-bar {display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none;}
:where(body.pg-index) .filter-bar::-webkit-scrollbar {display: none;}
:where(body.pg-index) .fchip {flex-shrink: 0; padding: 6px 12px; border-radius: 16px; background: #1e1e35; color: #888; border: 1px solid #2a2a45; font-size: 0.76rem; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;}
:where(body.pg-index) .fchip span {font-size: 0.68rem; color: #555;}
:where(body.pg-index) .fchip.active {background: #3a3a70; color: #c0c0ff; border-color: #5865F2;}
:where(body.pg-index) .fchip.active span {color: #9090d0;}
:where(body.pg-index) .fchip.rec {border-color: #5a3a18; color: #d09050;}
:where(body.pg-index) .fchip.rec.active {background: #5a3a18; color: #ffd0a0; border-color: #f0a860;}
:where(body.pg-index) .cat {background: #1a3530; color: #70c0a0; border-radius: 10px; padding: 2px 8px; font-size: 0.72rem;}
:where(body.pg-index) .score {background: #2a2a10; color: #c8c860; border-radius: 10px; padding: 2px 8px; font-size: 0.72rem;}
:where(body.pg-index) .card-title {font-size: 0.92rem; line-height: 1.5; margin-bottom: 6px;}
:where(body.pg-index) .card-title a {color: #b0b0ff; text-decoration: none;}
:where(body.pg-index) .card-summary {font-size: 0.78rem; color: #888; line-height: 1.4; margin-bottom: 10px; word-break: break-all;}
:where(body.pg-index) .btns {display: flex; gap: 6px; align-items: stretch;}
:where(body.pg-index) .btn-form {flex: 1; display: flex;}
:where(body.pg-index) .btn {width: 100%; padding: 11px 0; border: none; border-radius: 10px; font-size: 0.95rem; cursor: pointer; font-weight: 600; -webkit-tap-highlight-color: transparent;}
:where(body.pg-index) .btn-keep {background: #1a4a34; color: #70d090;}
:where(body.pg-index) .btn-skip {background: #4a1a1a; color: #d07070;}
:where(body.pg-index) .btn-unrate {background: #1e1e35; color: #888; font-size: 0.85rem;}
:where(body.pg-index) .btn-fav {background: #2a2000; color: #888; width: auto; padding: 11px 14px; font-size: 1.1rem; flex-shrink: 0;}
:where(body.pg-index) .btn-fav.on {background: #4a3800; color: #ffc400;}
:where(body.pg-index) .swipe-label {position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 0.1s;}
:where(body.pg-index) .swipe-label.keep-label {left: 16px; color: #70d090;}
:where(body.pg-index) .swipe-label.skip-label {right: 16px; color: #d07070;}
:where(body.pg-index) .bulk-bar {position: fixed; bottom: 0; left: 0; right: 0; background: #1a1a35; border-top: 1px solid #3a3a60; padding: 10px 16px; display: none; gap: 8px; z-index: 100; align-items: center;}
:where(body.pg-index) .bulk-bar.show {display: flex;}
:where(body.pg-index) .bulk-count {color: #aaa; font-size: 0.85rem; flex: 1;}
:where(body.pg-index) .bulk-btn {padding: 10px 18px; border: none; border-radius: 10px; font-size: 0.9rem; font-weight: 600; cursor: pointer;}
:where(body.pg-index) .bulk-keep {background: #1a4a34; color: #70d090;}
:where(body.pg-index) .bulk-skip {background: #4a1a1a; color: #d07070;}
:where(body.pg-index) .trend-card {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 12px; padding: 14px; margin-bottom: 12px;}
:where(body.pg-index) .trend-title {font-size: 0.8rem; color: #888; margin-bottom: 10px; font-weight: 600; letter-spacing: 0.04em;}
:where(body.pg-index) .trend-title.keep-color {color: #70d090;}
:where(body.pg-index) .trend-title.skip-color {color: #d07070;}
:where(body.pg-index) .trend-stats {display: flex; gap: 8px;}
:where(body.pg-index) .stat-item {flex: 1; text-align: center; background: #252545; border-radius: 8px; padding: 10px 4px;}
:where(body.pg-index) .stat-item.keep-bg {background: #1a2e20;}
:where(body.pg-index) .stat-item.skip-bg {background: #2e1a1a;}
:where(body.pg-index) .stat-num {display: block; font-size: 1.5rem; font-weight: 700; color: #ccc;}
:where(body.pg-index) .stat-item.keep-bg .stat-num {color: #70d090;}
:where(body.pg-index) .stat-item.skip-bg .stat-num {color: #d07070;}
:where(body.pg-index) .stat-label {font-size: 0.68rem; color: #888;}
:where(body.pg-index) .kw-tags {display: flex; flex-wrap: wrap; gap: 6px;}
:where(body.pg-index) .kw-tag {border-radius: 20px; padding: 4px 10px; font-size: 0.78rem; white-space: nowrap;}
:where(body.pg-index) .kw-tag.keep-tag {background: #1a3a28; color: #70d090; border: 1px solid #2a5a38;}
:where(body.pg-index) .kw-tag.skip-tag {background: #3a1a1a; color: #d07070; border: 1px solid #5a2a2a;}
:where(body.pg-index) .kw-rate {font-size: 0.68rem; opacity: 0.7; margin-left: 3px;}
:where(body.pg-index) .src-row {display: flex; align-items: center; gap: 8px; margin-bottom: 8px;}
:where(body.pg-index) .src-name {min-width: 65px; font-size: 0.78rem; color: #aaa;}
:where(body.pg-index) .src-bar-wrap {flex: 1; background: #252545; border-radius: 4px; height: 7px; overflow: hidden;}
:where(body.pg-index) .src-bar {height: 100%; background: #5865F2; border-radius: 4px; min-width: 2px;}
:where(body.pg-index) .src-pct {font-size: 0.72rem; color: #888; min-width: 72px; text-align: right;}
:where(body.pg-index) .pw-row {display: flex; align-items: center; gap: 8px; margin-bottom: 8px;}
:where(body.pg-index) .pw {background: #1a2a1a; border: 1px solid #2a5a2a; border-radius: 10px; padding: 6px 12px; font-size: 0.85rem; color: #80d080; flex: 1;}
:where(body.pg-index) .btn-del-pw {background: #1a2a1a; border: 1px solid #2a5a2a; color: #80d080; border-radius: 8px; padding: 4px 10px; font-size: 0.8rem; cursor: pointer; white-space: nowrap;}
:where(body.pg-index) .add-form {display: flex; gap: 8px; margin-bottom: 16px;}
:where(body.pg-index) .add-form input {flex: 1; padding: 10px 14px; background: #1e1e35; border: 1px solid #3a3a60; border-radius: 10px; color: #ddd; font-size: 0.9rem; outline: none; -webkit-appearance: none;}
:where(body.pg-index) .add-form button {padding: 10px 16px; background: #1a4a34; color: #70d090; border: none; border-radius: 10px; font-size: 0.9rem; font-weight: 600; cursor: pointer; white-space: nowrap;}
:where(body.pg-index) .empty {text-align: center; color: #555; padding: 50px 0; font-size: 0.9rem;}
:where(body.pg-index) .hint {font-size: 0.78rem; color: #666; margin-bottom: 10px;}

/* ── page: calendar ── */
body:where(.pg-calendar), :where(body.pg-calendar) * {box-sizing: border-box; margin: 0; padding: 0;}
html {scrollbar-gutter: stable;}
body:where(.pg-calendar) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; min-height: 100vh;}
:where(body.pg-calendar) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-calendar) .tabs {display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px;}
:where(body.pg-calendar) .tab {padding: 7px 2px; border-radius: 10px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.72rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;}
:where(body.pg-calendar) .tab.active {background: #5865F2; color: #fff;}
:where(body.pg-calendar) .tab-cnt {font-size: 0.65rem; color: #555; line-height: 1; min-height: 0.9em;}
:where(body.pg-calendar) .tab.active .tab-cnt {color: rgba(255,255,255,0.6);}
:where(body.pg-calendar) .cal-nav {display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;}
:where(body.pg-calendar) .cal-nav a {color: #8888ff; text-decoration: none; font-size: 1.4rem; padding: 4px 12px; background: #1e1e35; border-radius: 8px;}
:where(body.pg-calendar) .cal-month {font-size: 1rem; font-weight: 600; color: #ccc;}
:where(body.pg-calendar) .cal-grid {display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;}
:where(body.pg-calendar) .cal-head {text-align: center; padding: 6px 0; font-size: 0.75rem; color: #666;}
:where(body.pg-calendar) .cal-head.sun {color: #d07070;}
:where(body.pg-calendar) .cal-head.sat {color: #7090d0;}
:where(body.pg-calendar) .cal-cell {background: #1a1a2e; border-radius: 6px; padding: 4px; min-height: 60px; vertical-align: top;}
:where(body.pg-calendar) .cal-cell.today {border: 1px solid #5865F2;}
:where(body.pg-calendar) .cal-cell.weekend {background: #1a1a38;}
:where(body.pg-calendar) .cal-cell.empty {background: transparent;}
:where(body.pg-calendar) .cal-date {font-size: 0.78rem; color: #888; margin-bottom: 3px;}
:where(body.pg-calendar) .cal-date.today-num {color: #8888ff; font-weight: 700;}
:where(body.pg-calendar) .cal-date.sun-num {color: #d07070;}
:where(body.pg-calendar) .cal-date.sat-num {color: #7090d0;}
:where(body.pg-calendar) .cal-cell:not(.empty) {cursor: pointer;}
:where(body.pg-calendar) .cal-ev-wrap {display: flex; align-items: center; margin-bottom: 2px;}
:where(body.pg-calendar) .cal-event {flex: 1; display: block; font-size: 0.65rem; line-height: 1.3; padding: 1px 4px; border-radius: 4px; background: #2a3a5a; color: #a0b8e0; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
:where(body.pg-calendar) .cal-event.cat-event {background: #3a2a10; color: #d0a060;}
:where(body.pg-calendar) .cal-event.cat-new {background: #1a3a2a; color: #60c080;}
:where(body.pg-calendar) .cal-event.manual {background: #1a2e1a; color: #70c090;}
:where(body.pg-calendar) .ev-x {background: none; border: none; color: #666; font-size: 0.9rem; cursor: pointer; padding: 2px 5px; line-height: 1; flex-shrink: 0; -webkit-tap-highlight-color: transparent;}
:where(body.pg-calendar) .ev-x:active {color: #d07070;}
:where(body.pg-calendar) .no-event {text-align: center; color: #555; padding: 20px 0; font-size: 0.85rem;}
:where(body.pg-calendar) .add-ev-section {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 12px; padding: 14px; margin-top: 16px;}
:where(body.pg-calendar) .add-ev-title {font-size: 0.82rem; color: #aaa; margin-bottom: 10px; font-weight: 600;}
:where(body.pg-calendar) .cef-row {margin-bottom: 8px;}
:where(body.pg-calendar) .cef-row input {width: 100%; padding: 9px 12px; background: #13132a; border: 1px solid #3a3a60; border-radius: 8px; color: #ddd; font-size: 0.85rem; outline: none; -webkit-appearance: none; font-family: inherit;}
:where(body.pg-calendar) .cef-row input:focus {border-color: #5865F2;}
:where(body.pg-calendar) .cef-row input[type="date"]::-webkit-calendar-picker-indicator {filter: invert(0.6);}
:where(body.pg-calendar) .cef-add-btn {width: 100%; padding: 11px; background: #2a2a5a; color: #aaaaff; border: none; border-radius: 10px; font-size: 0.9rem; font-weight: 600; cursor: pointer; margin-top: 4px;}

/* ── page: attended ── */
body:where(.pg-attended), :where(body.pg-attended) * {box-sizing: border-box; margin: 0; padding: 0;}
html {scrollbar-gutter: stable;}
body:where(.pg-attended) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; padding-bottom: 40px; min-height: 100vh;}
:where(body.pg-attended) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-attended) .tabs {display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px;}
:where(body.pg-attended) .tab {padding: 7px 2px; border-radius: 10px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.72rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;}
:where(body.pg-attended) .tab.active {background: #5865F2; color: #fff;}
:where(body.pg-attended) .tab-cnt {font-size: 0.65rem; color: #555; line-height: 1; min-height: 0.9em;}
:where(body.pg-attended) .tab.active .tab-cnt {color: rgba(255,255,255,0.6);}
:where(body.pg-attended) .add-section {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 12px; padding: 14px; margin-bottom: 16px;}
:where(body.pg-attended) .add-section h2 {font-size: 0.82rem; color: #aaa; margin-bottom: 12px; font-weight: 600;}
:where(body.pg-attended) .form-row {margin-bottom: 10px;}
:where(body.pg-attended) .form-row label {display: block; font-size: 0.75rem; color: #888; margin-bottom: 4px;}
:where(body.pg-attended) .form-row input, :where(body.pg-attended) .form-row textarea {width: 100%; padding: 10px 12px;
  background: #13132a; border: 1px solid #3a3a60; border-radius: 8px;
  color: #ddd; font-size: 0.88rem; outline: none;
  -webkit-appearance: none; font-family: inherit;}
:where(body.pg-attended) .form-row textarea {resize: vertical; min-height: 64px;}
:where(body.pg-attended) .form-row input:focus, :where(body.pg-attended) .form-row textarea:focus {border-color: #5865F2;}
:where(body.pg-attended) .form-row input[type="date"]::-webkit-calendar-picker-indicator {filter: invert(0.6);}
:where(body.pg-attended) .btn-add {width: 100%; padding: 12px; background: #2a2a5a; color: #aaaaff; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer;}
:where(body.pg-attended) .btn-add:active {background: #3a3a8a;}
:where(body.pg-attended) .sort-bar {display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; align-items: center;}
:where(body.pg-attended) .sort-label {font-size: 0.74rem; color: #666;}
:where(body.pg-attended) .sort-btn {padding: 5px 10px; border-radius: 16px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.74rem; white-space: nowrap;}
:where(body.pg-attended) .sort-btn.active {background: #3a3a70; color: #b0b0ff;}
:where(body.pg-attended) .count-line {font-size: 0.76rem; color: #666; margin-bottom: 10px;}
:where(body.pg-attended) .ev-card {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 12px; padding: 14px; margin-bottom: 10px;}
:where(body.pg-attended) .ev-meta {display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; align-items: center;}
:where(body.pg-attended) .ev-tag {background: #252545; border-radius: 10px; padding: 2px 8px; font-size: 0.72rem; color: #999;}
:where(body.pg-attended) .ev-tag.date-tag {background: #1a2a3a; color: #70a8d0;}
:where(body.pg-attended) .ev-tag.org-tag {background: #2a2a10; color: #c8c860;}
:where(body.pg-attended) .ev-tag.kw-tag2 {background: #3a2410; color: #f0a860;}
:where(body.pg-attended) .kind-tabs {display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px;}
:where(body.pg-attended) .kind-tab {padding: 10px 6px; border-radius: 10px; background: #1a1a2e; border: 1px solid #2a2a45; color: #888; text-decoration: none; font-size: 0.85rem; text-align: center; display: flex; justify-content: center; align-items: center; gap: 6px;}
:where(body.pg-attended) .kind-tab span {font-size: 0.7rem; color: #555;}
:where(body.pg-attended) .kind-tab.active {background: #5865F2; border-color: #5865F2; color: #fff; font-weight: 600;}
:where(body.pg-attended) .kind-tab.active span {color: rgba(255,255,255,0.7);}
:where(body.pg-attended) .kind-tab.ev.active {background: #8a5a20; border-color: #f0a860;}
:where(body.pg-attended) .rec-box {background: #24180c; border: 1px solid #5a3a18; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center;}
:where(body.pg-attended) .rec-text {flex: 1; font-size: 0.78rem; color: #d0b090; line-height: 1.6;}
:where(body.pg-attended) .rec-text b {color: #f0a860;}
:where(body.pg-attended) .rec-last {font-size: 0.7rem; color: #8a7050;}
:where(body.pg-attended) .btn-rec {flex-shrink: 0; padding: 9px 14px; background: #5a3a18; color: #ffd0a0; border: none; border-radius: 10px; font-size: 0.82rem; font-weight: 600; cursor: pointer; white-space: nowrap;}
:where(body.pg-attended) .btn-rec:disabled {opacity: 0.6; cursor: default;}
:where(body.pg-attended) .ev-name {font-size: 0.95rem; font-weight: 600; color: #eee; line-height: 1.4; margin-bottom: 6px;}
:where(body.pg-attended) .ev-url {display: inline-block; font-size: 0.76rem; color: #70a8d0; word-break: break-all; margin-bottom: 8px; text-decoration: none;}
:where(body.pg-attended) .ev-url:before {content: "🔗 ";}
:where(body.pg-attended) .ev-notes {font-size: 0.8rem; color: #888; line-height: 1.5; margin-bottom: 10px; white-space: pre-wrap; word-break: break-all;}
:where(body.pg-attended) .ev-footer {display: flex; justify-content: flex-end; gap: 8px;}
:where(body.pg-attended) .btn-edit {background: #1a2a3a; border: 1px solid #2a4a6a; color: #70a8d0; border-radius: 8px; padding: 5px 12px; font-size: 0.78rem; text-decoration: none; display: inline-flex; align-items: center;}
:where(body.pg-attended) .btn-del {background: #2a1a1a; border: 1px solid #5a2a2a; color: #d07070; border-radius: 8px; padding: 5px 12px; font-size: 0.78rem; cursor: pointer;}
:where(body.pg-attended) .empty {text-align: center; color: #555; padding: 60px 0; font-size: 0.9rem;}
:where(body.pg-attended) .copy-bar {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;}
:where(body.pg-attended) .copy-bar-label {font-size: 0.74rem; color: #666; white-space: nowrap;}
:where(body.pg-attended) .copy-checks {display: flex; flex-wrap: wrap; gap: 6px; flex: 1;}
:where(body.pg-attended) .copy-checks label {display: flex; align-items: center; gap: 4px; font-size: 0.76rem; color: #aaa; cursor: pointer; white-space: nowrap;}
:where(body.pg-attended) .copy-checks input[type=checkbox] {accent-color: #5865F2; width: 14px; height: 14px; cursor: pointer;}
:where(body.pg-attended) .btn-copy {padding: 7px 14px; background: #2a2a5a; color: #aaaaff; border: none; border-radius: 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0;}
:where(body.pg-attended) .btn-copy.copied {background: #1a4a34; color: #70d090;}
:where(body.pg-attended) .modal-overlay {display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.78); z-index: 10000; align-items: center; justify-content: center; padding: 16px;}
:where(body.pg-attended) .modal-overlay.show {display: flex;}
:where(body.pg-attended) .modal-box {background: #1a1a2e; border: 1px solid #3a3a60; border-radius: 14px; padding: 16px; width: 100%; max-width: 500px; max-height: 80vh; display: flex; flex-direction: column; gap: 10px;}
:where(body.pg-attended) .modal-title {font-size: 0.85rem; color: #aaa; font-weight: 600;}
:where(body.pg-attended) .modal-hint {font-size: 0.74rem; color: #666;}
:where(body.pg-attended) .modal-ta {flex: 1; min-height: 200px; max-height: 45vh; background: #0f0f1a; border: 1px solid #3a3a60; border-radius: 8px; color: #ccc; font-size: 0.82rem; padding: 10px; resize: none; font-family: monospace; line-height: 1.6;}
:where(body.pg-attended) .modal-btns {display: flex; gap: 8px;}
:where(body.pg-attended) .modal-copy {flex: 1; padding: 11px; background: #2a2a5a; color: #aaaaff; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer;}
:where(body.pg-attended) .modal-close {flex: 1; padding: 11px; background: #1e1e35; color: #888; border: none; border-radius: 8px; font-size: 0.9rem; cursor: pointer;}
:where(body.pg-attended) .ev-thumb {float: right; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; margin: 0 0 6px 10px; background: #13132a; border: 1px solid #2a2a45;}
:where(body.pg-attended) .ev-footer {clear: both;}
:where(body.pg-attended) .edit-thumb {width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid #2a2a45; display: block; margin-bottom: 8px;}
:where(body.pg-attended) .ev-notes.clamp {max-height: 4.6em; overflow: hidden; position: relative; margin-bottom: 4px;}
:where(body.pg-attended) .ev-notes.clamp:not(.open)::after {content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.6em; background: linear-gradient(rgba(26,26,46,0), #1a1a2e);}
:where(body.pg-attended) .ev-notes.clamp.open {max-height: none;}
:where(body.pg-attended) .notes-toggle {background: none; border: none; color: #8888ff; font-size: 0.76rem; padding: 2px 0 8px; cursor: pointer;}

/* ── page: edit_attended ── */
body:where(.pg-edit_attended), :where(body.pg-edit_attended) * {box-sizing: border-box; margin: 0; padding: 0;}
body:where(.pg-edit_attended) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; min-height: 100vh;}
:where(body.pg-edit_attended) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-edit_attended) .back {display: inline-flex; align-items: center; gap: 6px; color: #70a8d0; text-decoration: none; font-size: 0.85rem; margin-bottom: 16px;}
:where(body.pg-edit_attended) .edit-section {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 12px; padding: 14px;}
:where(body.pg-edit_attended) .edit-section h2 {font-size: 0.82rem; color: #aaa; margin-bottom: 12px; font-weight: 600;}
:where(body.pg-edit_attended) .form-row {margin-bottom: 10px;}
:where(body.pg-edit_attended) .form-row label {display: block; font-size: 0.75rem; color: #888; margin-bottom: 4px;}
:where(body.pg-edit_attended) .form-row input, :where(body.pg-edit_attended) .form-row textarea {width: 100%; padding: 10px 12px;
  background: #13132a; border: 1px solid #3a3a60; border-radius: 8px;
  color: #ddd; font-size: 0.88rem; outline: none;
  -webkit-appearance: none; font-family: inherit;}
:where(body.pg-edit_attended) .form-row textarea {resize: vertical; min-height: 64px;}
:where(body.pg-edit_attended) .form-row input:focus, :where(body.pg-edit_attended) .form-row textarea:focus {border-color: #5865F2;}
:where(body.pg-edit_attended) .form-row input[type="date"]::-webkit-calendar-picker-indicator {filter: invert(0.6);}
:where(body.pg-edit_attended) .btn-row {display: flex; gap: 8px; margin-top: 14px;}
:where(body.pg-edit_attended) .btn-save {flex: 1; padding: 12px; background: #2a2a5a; color: #aaaaff; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer;}
:where(body.pg-edit_attended) .btn-cancel {flex: 1; padding: 12px; background: #1e1e35; color: #888; border: none; border-radius: 10px; font-size: 0.95rem; cursor: pointer; text-decoration: none; display: flex; align-items: center; justify-content: center;}
:where(body.pg-edit_attended) .ev-thumb {float: right; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; margin: 0 0 6px 10px; background: #13132a; border: 1px solid #2a2a45;}
:where(body.pg-edit_attended) .ev-footer {clear: both;}
:where(body.pg-edit_attended) .edit-thumb {width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid #2a2a45; display: block; margin-bottom: 8px;}

/* ── page: candidates ── */
body:where(.pg-candidates), :where(body.pg-candidates) * {box-sizing: border-box; margin: 0; padding: 0;}
html {scrollbar-gutter: stable;}
body:where(.pg-candidates) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; padding-bottom: 40px; min-height: 100vh;}
:where(body.pg-candidates) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-candidates) .tabs {display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px;}
:where(body.pg-candidates) .tab {padding: 7px 2px; border-radius: 10px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.72rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;}
:where(body.pg-candidates) .tab.active {background: #5865F2; color: #fff;}
:where(body.pg-candidates) .tab-cnt {font-size: 0.65rem; color: #555; line-height: 1; min-height: 0.9em;}
:where(body.pg-candidates) .tab.active .tab-cnt {color: rgba(255,255,255,0.6);}
:where(body.pg-candidates) .fetch-section {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 12px; padding: 14px; margin-bottom: 12px;}
:where(body.pg-candidates) .fetch-title {font-size: 0.82rem; color: #aaa; margin-bottom: 10px; font-weight: 600;}
:where(body.pg-candidates) .fetch-row {display: flex; gap: 8px;}
:where(body.pg-candidates) .fetch-row input {flex: 1; padding: 10px 12px; background: #13132a; border: 1px solid #3a3a60; border-radius: 8px; color: #ddd; font-size: 0.85rem; outline: none; -webkit-appearance: none; font-family: inherit;}
:where(body.pg-candidates) .fetch-row input:focus {border-color: #5865F2;}
:where(body.pg-candidates) .btn-fetch {padding: 10px 16px; background: #1a2a1a; border: 1px solid #2a5a2a; color: #80d080; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap;}
:where(body.pg-candidates) .btn-fetch:disabled {opacity: 0.5; cursor: default;}
:where(body.pg-candidates) .fetch-status {font-size: 0.78rem; margin-top: 6px; min-height: 1.2em;}
:where(body.pg-candidates) .add-section {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 12px; padding: 14px; margin-bottom: 16px;}
:where(body.pg-candidates) .add-section h2 {font-size: 0.82rem; color: #aaa; margin-bottom: 12px; font-weight: 600;}
:where(body.pg-candidates) .form-row {margin-bottom: 10px;}
:where(body.pg-candidates) .form-row label {display: block; font-size: 0.75rem; color: #888; margin-bottom: 4px;}
:where(body.pg-candidates) .form-row input, :where(body.pg-candidates) .form-row textarea {width: 100%; padding: 10px 12px; background: #13132a; border: 1px solid #3a3a60; border-radius: 8px; color: #ddd; font-size: 0.88rem; outline: none; -webkit-appearance: none; font-family: inherit;}
:where(body.pg-candidates) .form-row textarea {resize: vertical; min-height: 64px;}
:where(body.pg-candidates) .form-row input:focus, :where(body.pg-candidates) .form-row textarea:focus {border-color: #5865F2;}
:where(body.pg-candidates) .form-row input[type="date"]::-webkit-calendar-picker-indicator {filter: invert(0.6);}
:where(body.pg-candidates) .btn-add {width: 100%; padding: 12px; background: #2a2a5a; color: #aaaaff; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer;}
:where(body.pg-candidates) .sort-bar {display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; align-items: center;}
:where(body.pg-candidates) .sort-label {font-size: 0.74rem; color: #666;}
:where(body.pg-candidates) .sort-btn {padding: 5px 10px; border-radius: 16px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.74rem; white-space: nowrap;}
:where(body.pg-candidates) .sort-btn.active {background: #3a3a70; color: #b0b0ff;}
:where(body.pg-candidates) .count-line {font-size: 0.76rem; color: #666; margin-bottom: 10px;}
:where(body.pg-candidates) .ev-card {background: #1a1a2e; border: 1px solid #2a3a20; border-radius: 12px; padding: 14px; margin-bottom: 10px; border-left: 3px solid #2a5a2a;}
:where(body.pg-candidates) .ev-meta {display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; align-items: center;}
:where(body.pg-candidates) .ev-tag {background: #252545; border-radius: 10px; padding: 2px 8px; font-size: 0.72rem; color: #999;}
:where(body.pg-candidates) .ev-tag.date-tag {background: #1a2a3a; color: #70a8d0;}
:where(body.pg-candidates) .ev-tag.org-tag {background: #2a2a10; color: #c8c860;}
:where(body.pg-candidates) .ev-name {font-size: 0.95rem; font-weight: 600; color: #eee; line-height: 1.4; margin-bottom: 6px;}
:where(body.pg-candidates) .ev-url {display: inline-block; font-size: 0.76rem; color: #70a8d0; word-break: break-all; margin-bottom: 8px; text-decoration: none;}
:where(body.pg-candidates) .ev-url:before {content: "🔗 ";}
:where(body.pg-candidates) .ev-notes {font-size: 0.8rem; color: #888; line-height: 1.5; margin-bottom: 10px; white-space: pre-wrap; word-break: break-all;}
:where(body.pg-candidates) .ev-footer {display: flex; justify-content: flex-end; gap: 8px;}
:where(body.pg-candidates) .btn-edit {background: #1a2a3a; border: 1px solid #2a4a6a; color: #70a8d0; border-radius: 8px; padding: 5px 12px; font-size: 0.78rem; text-decoration: none; display: inline-flex; align-items: center;}
:where(body.pg-candidates) .btn-del {background: #2a1a1a; border: 1px solid #5a2a2a; color: #d07070; border-radius: 8px; padding: 5px 12px; font-size: 0.78rem; cursor: pointer;}
:where(body.pg-candidates) .empty {text-align: center; color: #555; padding: 60px 0; font-size: 0.9rem;}
:where(body.pg-candidates) .date-range {display: flex; align-items: center; gap: 6px;}
:where(body.pg-candidates) .date-range input {flex: 1; min-width: 0;}
:where(body.pg-candidates) .date-range span {color: #666; font-size: 0.85rem;}
:where(body.pg-candidates) .ev-thumb {float: right; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; margin: 0 0 6px 10px; background: #13132a; border: 1px solid #2a2a45;}
:where(body.pg-candidates) .ev-footer {clear: both;}
:where(body.pg-candidates) .edit-thumb {width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid #2a2a45; display: block; margin-bottom: 8px;}
:where(body.pg-candidates) .ev-notes.clamp {max-height: 4.6em; overflow: hidden; position: relative; margin-bottom: 4px;}
:where(body.pg-candidates) .ev-notes.clamp:not(.open)::after {content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.6em; background: linear-gradient(rgba(26,26,46,0), #1a1a2e);}
:where(body.pg-candidates) .ev-notes.clamp.open {max-height: none;}
:where(body.pg-candidates) .notes-toggle {background: none; border: none; color: #8888ff; font-size: 0.76rem; padding: 2px 0 8px; cursor: pointer;}

/* ── page: edit_candidates ── */
body:where(.pg-edit_candidates), :where(body.pg-edit_candidates) * {box-sizing: border-box; margin: 0; padding: 0;}
html {scrollbar-gutter: stable;}
body:where(.pg-edit_candidates) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; min-height: 100vh;}
:where(body.pg-edit_candidates) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-edit_candidates) .back {display: inline-flex; align-items: center; gap: 6px; color: #70a8d0; text-decoration: none; font-size: 0.85rem; margin-bottom: 16px;}
:where(body.pg-edit_candidates) .edit-section {background: #1a1a2e; border: 1px solid #2a2a45; border-radius: 12px; padding: 14px;}
:where(body.pg-edit_candidates) .edit-section h2 {font-size: 0.82rem; color: #aaa; margin-bottom: 12px; font-weight: 600;}
:where(body.pg-edit_candidates) .form-row {margin-bottom: 10px;}
:where(body.pg-edit_candidates) .form-row label {display: block; font-size: 0.75rem; color: #888; margin-bottom: 4px;}
:where(body.pg-edit_candidates) .form-row input, :where(body.pg-edit_candidates) .form-row textarea {width: 100%; padding: 10px 12px; background: #13132a; border: 1px solid #3a3a60; border-radius: 8px; color: #ddd; font-size: 0.88rem; outline: none; -webkit-appearance: none; font-family: inherit;}
:where(body.pg-edit_candidates) .form-row textarea {resize: vertical; min-height: 64px;}
:where(body.pg-edit_candidates) .form-row input:focus, :where(body.pg-edit_candidates) .form-row textarea:focus {border-color: #5865F2;}
:where(body.pg-edit_candidates) .form-row input[type="date"]::-webkit-calendar-picker-indicator {filter: invert(0.6);}
:where(body.pg-edit_candidates) .btn-row {display: flex; gap: 8px; margin-top: 14px;}
:where(body.pg-edit_candidates) .btn-save {flex: 1; padding: 12px; background: #2a2a5a; color: #aaaaff; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer;}
:where(body.pg-edit_candidates) .btn-cancel {flex: 1; padding: 12px; background: #1e1e35; color: #888; border: none; border-radius: 10px; font-size: 0.95rem; cursor: pointer; text-decoration: none; display: flex; align-items: center; justify-content: center;}
:where(body.pg-edit_candidates) .date-range {display: flex; align-items: center; gap: 6px;}
:where(body.pg-edit_candidates) .date-range input {flex: 1; min-width: 0;}
:where(body.pg-edit_candidates) .date-range span {color: #666; font-size: 0.85rem;}
:where(body.pg-edit_candidates) .ev-thumb {float: right; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; margin: 0 0 6px 10px; background: #13132a; border: 1px solid #2a2a45;}
:where(body.pg-edit_candidates) .ev-footer {clear: both;}
:where(body.pg-edit_candidates) .edit-thumb {width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid #2a2a45; display: block; margin-bottom: 8px;}

/* ── page: stats ── */
body:where(.pg-stats), :where(body.pg-stats) * {box-sizing: border-box; margin: 0; padding: 0;}
body:where(.pg-stats) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; padding-bottom: 40px; min-height: 100vh;}
:where(body.pg-stats) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-stats) .tabs {display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px;}
:where(body.pg-stats) .tab {padding: 7px 2px; border-radius: 10px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.72rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;}
:where(body.pg-stats) .tab.active {background: #5865F2; color: #fff;}
:where(body.pg-stats) .tab-cnt {font-size: 0.65rem; color: #555; line-height: 1; min-height: 0.9em;}
:where(body.pg-stats) .tab.active .tab-cnt {color: rgba(255,255,255,0.6);}
:where(body.pg-stats) .fchip {flex-shrink: 0; padding: 6px 12px; border-radius: 16px; background: #1e1e35; color: #888; border: 1px solid #2a2a45; font-size: 0.76rem; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; text-decoration: none;}
:where(body.pg-stats) .fchip.active {background: #3a3a70; color: #c0c0ff; border-color: #5865F2;}
:where(body.pg-stats) ol, :where(body.pg-stats) ul {padding-left: 1.2em;}
/* ── page: settings ── */
body:where(.pg-settings), :where(body.pg-settings) * {box-sizing: border-box; margin: 0; padding: 0;}
body:where(.pg-settings) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; padding-bottom: 40px; min-height: 100vh;}
:where(body.pg-settings) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-settings) .tabs {display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px;}
:where(body.pg-settings) .tab {padding: 7px 2px; border-radius: 10px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.72rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;}
:where(body.pg-settings) .tab.active {background: #5865F2; color: #fff;}
:where(body.pg-settings) .tab-cnt {font-size: 0.65rem; color: #555; line-height: 1; min-height: 0.9em;}
:where(body.pg-settings) .tab.active .tab-cnt {color: rgba(255,255,255,0.6);}
:where(body.pg-settings) .fchip {flex-shrink: 0; padding: 6px 12px; border-radius: 16px; background: #1e1e35; color: #888; border: 1px solid #2a2a45; font-size: 0.76rem; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; text-decoration: none;}
:where(body.pg-settings) .fchip.active {background: #3a3a70; color: #c0c0ff; border-color: #5865F2;}
:where(body.pg-settings) ol, :where(body.pg-settings) ul {padding-left: 1.2em;}
/* ── page: status ── */
body:where(.pg-status), :where(body.pg-status) * {box-sizing: border-box; margin: 0; padding: 0;}
body:where(.pg-status) {font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #0f0f1a; color: #ddd; padding: 12px; padding-bottom: 40px; min-height: 100vh;}
:where(body.pg-status) h1 {font-size: 1.05rem; padding: 10px 0 14px; color: #8888ff;}
:where(body.pg-status) .tabs {display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px;}
:where(body.pg-status) .tab {padding: 7px 2px; border-radius: 10px; background: #1e1e35; color: #888; text-decoration: none; font-size: 0.72rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;}
:where(body.pg-status) .tab.active {background: #5865F2; color: #fff;}
:where(body.pg-status) .tab-cnt {font-size: 0.65rem; color: #555; line-height: 1; min-height: 0.9em;}
:where(body.pg-status) .tab.active .tab-cnt {color: rgba(255,255,255,0.6);}
:where(body.pg-status) .fchip {flex-shrink: 0; padding: 6px 12px; border-radius: 16px; background: #1e1e35; color: #888; border: 1px solid #2a2a45; font-size: 0.76rem; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; text-decoration: none;}
:where(body.pg-status) .fchip.active {background: #3a3a70; color: #c0c0ff; border-color: #5865F2;}
:where(body.pg-status) ol, :where(body.pg-status) ul {padding-left: 1.2em;}

/* ══ iPhone 風レイヤー ══ */

:root { --bg:#000; --card:#1c1c1e; --card2:#2c2c2e; --card3:#3a3a3c; --sep:rgba(84,84,88,.55);
        --label:#fff; --label2:rgba(235,235,245,.62); --label3:rgba(235,235,245,.32);
        --blue:#0a84ff; --green:#30d158; --red:#ff453a; --orange:#ff9f0a; --yellow:#ffd60a; --indigo:#5e5ce6; color-scheme: dark; }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: ios-fade-out .16s ease both; }
::view-transition-new(root) { animation: ios-fade-in .24s cubic-bezier(.2,.8,.2,1) both; }
.tabs { view-transition-name: ios-tabs; }
@keyframes ios-fade-out { to { opacity: 0; } }
@keyframes ios-fade-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes ios-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { background: var(--bg) !important; color: var(--label) !important;
       font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif !important;
       -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body:has(.tabs), body:has(.back) { padding: calc(env(safe-area-inset-top) + 4px) max(14px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 90px) max(14px, env(safe-area-inset-left)) !important; }
h1 { font-size: 1.85rem !important; font-weight: 800 !important; letter-spacing: -.02em; color: var(--label) !important; padding: 12px 0 8px !important; }
a[href="/logout"] { background: var(--card) !important; color: var(--label2) !important; border-radius: 999px !important; padding: 0 14px !important;
  height: 34px; display: inline-flex !important; align-items: center; flex-shrink: 0; font-size: .78rem !important; font-weight: 600; text-decoration: none !important; }

/* タブ：横スクロールのピル型＋すりガラスの固定バー（ステータスバーの裏は別の帯で覆う） */
body::before { content: ''; position: fixed; left: 0; right: 0; top: 0; height: env(safe-area-inset-top); z-index: 61;
               background: rgba(0,0,0,.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); pointer-events: none; }
.tabs { display: flex !important; gap: 6px !important; overflow-x: auto; position: sticky; top: 0; z-index: 60;
        margin: 0 calc(-1 * max(14px, env(safe-area-inset-left))) 14px !important;
        padding: 8px 14px 10px !important; top: env(safe-area-inset-top);
        background: rgba(0,0,0,.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
        border-bottom: .5px solid var(--sep); scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto !important; flex-direction: row !important; align-items: center !important; gap: 6px !important;
       padding: 8px 14px !important; border-radius: 999px !important; background: var(--card) !important;
       color: var(--label2) !important; font-size: .82rem !important; font-weight: 600 !important; scroll-snap-align: center; }
.tab.active, .tab.fav-tab.active { background: var(--label) !important; color: #000 !important; }
.tab-cnt { font-size: .72rem !important; color: var(--label3) !important; min-height: 0 !important; }
.tab.active .tab-cnt { color: rgba(0,0,0,.45) !important; }

/* カード・グループ */
.card, .ev-card, .add-section, .edit-section, .copy-bar, .trend-card, .fetch-section, .rec-box,
.add-ev-section, .modal-box, .box { background: var(--card) !important; border: none !important; border-radius: 16px !important; }
.ev-card { border-left: none !important; }
.card, .ev-card { animation: ios-rise .32s cubic-bezier(.2,.8,.2,1) both; }
.card.v-keep { box-shadow: inset 3px 0 0 var(--green); }
.card.v-skip { box-shadow: inset 3px 0 0 var(--red); }
.card.v-fav  { box-shadow: inset 3px 0 0 var(--yellow); }
.card-title a, .ev-name { color: var(--label) !important; }
.card-summary, .ev-notes { color: var(--label2) !important; }
.ev-notes.clamp:not(.open)::after { background: linear-gradient(rgba(28,28,30,0), var(--card)) !important; }
.tag, .ev-tag, .cat, .score { border-radius: 6px !important; }
.tag { background: var(--card2) !important; color: var(--label2) !important; }
.tag.rec-tag { background: rgba(255,159,10,.16) !important; color: var(--orange) !important; }
.tag.date-tag2, .ev-tag.date-tag { background: rgba(10,132,255,.14) !important; color: #64aaff !important; }
.btn-fetch { border: none !important; }
/* 追加フォームは見出しをタップして開く（一覧をすぐ見られるように） */
.add-section > h2 { cursor: pointer; display: flex; align-items: center; justify-content: space-between; margin: 0 !important;
                    color: var(--blue) !important; font-size: .95rem !important; }
.add-section > h2::after { content: "›"; font-size: 1.3rem; line-height: 1; color: var(--label3); transition: transform .2s ease; transform: rotate(90deg); }
.add-section.ios-collapsed > h2::after { transform: rotate(0deg); }
.add-section > h2 + * { margin-top: 12px; }
.add-section.ios-collapsed > :not(h2) { display: none !important; }
.add-section h2, .edit-section h2, .count-line, .sort-label, .hint { color: var(--label2) !important; }
.empty, .no-results { color: var(--label3) !important; }

/* 入力欄：16px 以上にして iPhone の自動ズームを防ぐ */
input:not([type=checkbox]):not([type=radio]), textarea, select {
  font-size: 16px !important; background: var(--card2) !important; border: none !important; border-radius: 10px !important;
  color: var(--label) !important; caret-color: var(--blue); transition: box-shadow .15s; }
input:not([type=checkbox]):focus, textarea:focus, select:focus { box-shadow: 0 0 0 2px var(--blue) !important; outline: none; }
input::placeholder, textarea::placeholder { color: var(--label3) !important; }
input[type=checkbox] { accent-color: var(--blue); }

/* ボタン：押した瞬間に縮む（反応を即座に見せる） */
button, .btn, .tab, .fchip, .sort-btn, .kind-tab, .btn-edit, .btn-cancel, .back, a.btn-add, .cal-nav a {
  transition: transform .12s ease, opacity .12s ease, background-color .2s ease !important; -webkit-user-select: none; user-select: none; }
button:active, .btn:active, .tab:active, .fchip:active, .sort-btn:active, .kind-tab:active, .btn-edit:active,
.btn-cancel:active, .back:active, .cal-nav a:active { transform: scale(.95); opacity: .75; }
.btn { border-radius: 12px !important; }
.btn-keep  { background: rgba(48,209,88,.16) !important; color: var(--green) !important; }
.btn-skip  { background: rgba(255,69,58,.16) !important; color: var(--red) !important; }
.btn-unrate{ background: var(--card2) !important; color: var(--label2) !important; }
.btn-fav   { background: var(--card2) !important; color: var(--label3) !important; }
.btn-fav.on{ background: rgba(255,214,10,.16) !important; color: var(--yellow) !important; }
.btn-cand  { background: rgba(10,132,255,.14) !important; color: var(--blue) !important; border: none !important; border-radius: 12px !important; }
.btn-add, .btn-save, .btn-fetch, .modal-copy, .add-form button { background: var(--blue) !important; color: #fff !important; border-radius: 12px !important; }
.btn-cancel, .modal-close { background: var(--card2) !important; color: var(--label) !important; border-radius: 12px !important; }
.btn-edit  { background: rgba(10,132,255,.14) !important; color: var(--blue) !important; border: none !important; border-radius: 999px !important; }
.btn-del   { background: rgba(255,69,58,.14) !important; color: var(--red) !important; border: none !important; border-radius: 999px !important; }
.btn-copy  { background: var(--card2) !important; color: var(--blue) !important; }
.btn-rec   { background: rgba(255,159,10,.18) !important; color: var(--orange) !important; }
.back { color: var(--blue) !important; font-weight: 500; }
.notes-toggle { color: var(--blue) !important; }
.ev-url { color: var(--blue) !important; }

/* チップ・セグメント */
.fchip, .sort-btn { background: var(--card) !important; border: none !important; color: var(--label2) !important; border-radius: 999px !important; }
.fchip.active, .sort-btn.active { background: var(--blue) !important; color: #fff !important; }
.fchip.active span { color: rgba(255,255,255,.7) !important; }
.fchip.rec.active { background: var(--orange) !important; color: #000 !important; }
.kind-tabs { background: var(--card); border-radius: 11px; padding: 3px; gap: 3px !important; }
.kind-tab { background: transparent !important; border: none !important; border-radius: 8px !important; color: var(--label2) !important; padding: 8px 6px !important; }
.kind-tab.active, .kind-tab.ev.active { background: var(--card3) !important; color: var(--label) !important; box-shadow: 0 3px 8px rgba(0,0,0,.25); }

/* 下からのバー・トースト */
.bulk-bar { background: rgba(28,28,30,.82) !important; -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
            border-top: .5px solid var(--sep) !important; padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important; }
.modal-overlay { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ページ移動中の細いバー（押した瞬間に出して待ち時間を感じさせない） */
#ios-prog { position: fixed; top: 0; left: 0; height: 2.5px; width: 0; background: var(--blue); z-index: 9999; opacity: 0;
            box-shadow: 0 0 8px var(--blue); pointer-events: none; }
#ios-prog.run { opacity: 1; animation: ios-prog 2.4s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes ios-prog { 0% { width: 0; } 30% { width: 55%; } 100% { width: 88%; } }


/* カレンダー：長い予定名で列幅が崩れないように */
.cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; gap: 3px !important; }
.cal-cell { min-width: 0; background: var(--card) !important; border-radius: 8px !important; }
.cal-cell.empty { background: transparent !important; }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--blue); border: none !important; }
.cal-ev-wrap, .cal-event { min-width: 0; }
.cal-event { background: rgba(10,132,255,.18) !important; color: #8cc4ff !important; }
.cal-nav a { background: var(--card) !important; color: var(--blue) !important; border-radius: 999px !important; }
.cal-month { color: var(--label) !important; }

/* ── カレンダー（iPhone のカレンダー風） ── */
.c2-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; }
.c2-title { font-size: 1.05rem; color: var(--label2); }
.c2-title b { font-size: 1.6rem; color: var(--label); margin-left: 4px; font-weight: 800; letter-spacing: -.01em; }
.c2-navs { display: flex; gap: 8px; align-items: center; }
.c2-arrow { width: 38px; height: 38px; border-radius: 50%; background: var(--card); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; text-decoration: none; line-height: 1; padding-bottom: 3px; }
.c2-today { padding: 8px 14px; border-radius: 999px; background: rgba(10,132,255,.16); color: var(--blue); font-size: .82rem; font-weight: 600; text-decoration: none; }
.c2-card { background: var(--card); border-radius: 16px; padding: 10px 8px 8px; margin-bottom: 18px; }
.c2-week, .c2-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.c2-week span { text-align: center; font-size: .7rem; font-weight: 600; color: var(--label3); padding-bottom: 6px; }
.c2-week .sun { color: rgba(255,69,58,.75); } .c2-week .sat { color: rgba(100,170,255,.85); }
.c2-day { appearance: none; -webkit-appearance: none; background: none; border: none; padding: 4px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; min-height: 50px; color: var(--label); font: inherit; }
.c2-day.empty { cursor: default; }
.c2-num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .95rem; font-weight: 500; transition: background .15s, color .15s; }
.c2-day.sun .c2-num { color: #ff6961; } .c2-day.sat .c2-num { color: #64aaff; }
.c2-day.today .c2-num { color: var(--red) !important; font-weight: 700; }
.c2-day.sel .c2-num { background: var(--label); color: #000 !important; font-weight: 700; }
.c2-day.today.sel .c2-num { background: var(--red); color: #fff !important; }
.c2-dots { display: flex; gap: 3px; height: 6px; align-items: center; }
.c2-dots i, .c2-legend i, .c2-ag-item i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.c2-dots em { font-style: normal; font-size: .55rem; color: var(--label3); line-height: 1; }
i.rec { background: var(--orange) !important; } i.col { background: var(--blue) !important; } i.manual { background: var(--green) !important; }
.c2-legend { display: flex; justify-content: center; gap: 14px; padding-top: 8px; border-top: .5px solid var(--sep); margin-top: 4px; font-size: .68rem; color: var(--label3); }
.c2-legend span { display: flex; align-items: center; gap: 5px; }
.c2-sec-title { font-size: 1.05rem; font-weight: 700; color: var(--label); margin: 4px 4px 8px; }
.c2-sec-title span { font-size: .78rem; font-weight: 500; color: var(--label3); margin-left: 6px; }
.c2-list { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.c2-row { display: flex; align-items: center; gap: 10px; padding: 11px 10px 11px 12px; border-bottom: .5px solid var(--sep); }
.c2-row:last-child { border-bottom: none; }
.c2-bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--blue); flex-shrink: 0; }
.c2-row.rec .c2-bar { background: var(--orange); } .c2-row.manual .c2-bar { background: var(--green); }
.c2-row-main { flex: 1; min-width: 0; }
.c2-row-title { font-size: .9rem; line-height: 1.4; color: var(--label); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c2-row-title a { color: var(--label); text-decoration: none; }
.c2-row-sub { font-size: .72rem; color: var(--label3); margin-top: 2px; }
.c2-row form { margin: 0; }
.c2-del { width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--card2); color: var(--label3); font-size: 1rem; line-height: 1; cursor: pointer; }
.c2-empty { color: var(--label3); font-size: .85rem; text-align: center; padding: 18px 0; }
.c2-list .c2-empty { padding: 16px 0; }
.c2-addbtn { width: 100%; padding: 12px; border: none; border-radius: 12px; background: rgba(10,132,255,.14); color: var(--blue); font-size: .9rem; font-weight: 600; margin-bottom: 22px; cursor: pointer; }
.c2-add { margin: -12px 0 22px; padding: 14px !important; }
.c2-add[hidden] { display: none !important; }
.c2-add .add-ev-title { color: var(--label2) !important; font-size: .85rem; margin-bottom: 10px; }
.c2-add .cef-row { margin-bottom: 8px; }
.c2-add .cef-row input { width: 100%; padding: 11px 12px; }
.c2-add .cef-add-btn { width: 100%; padding: 12px; border: none; border-radius: 12px; background: var(--blue) !important; color: #fff !important; font-weight: 700; font-size: .95rem; }
.c2-agenda { background: var(--card); border-radius: 14px; overflow: hidden; }
.c2-ag-row { appearance: none; -webkit-appearance: none; width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; background: none; border: none; border-bottom: .5px solid var(--sep); text-align: left; font: inherit; color: var(--label); cursor: pointer; }
.c2-ag-row:last-child { border-bottom: none; }
.c2-ag-date { width: 34px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.c2-ag-date b { font-size: 1.1rem; } .c2-ag-date small { font-size: .65rem; color: var(--label3); }
.c2-ag-date.sun b { color: #ff6961; } .c2-ag-date.sat b { color: #64aaff; }
.c2-ag-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.c2-ag-item i { margin-right: 7px; vertical-align: 1px; }
.c2-ag-item { display: block; font-size: .82rem; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ── 更新ボタン・引っぱって更新 ── */
.ios-hdr-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ios-reload { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--card); color: var(--blue);
              display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.ios-reload svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ios-reload.spin svg { animation: ios-spin .7s linear infinite; }
@keyframes ios-spin { to { transform: rotate(360deg); } }
#ios-ptr { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 50%; z-index: 80; width: 36px; height: 36px; margin-left: -18px;
           border-radius: 50%; background: var(--card2); color: var(--label2); display: flex; align-items: center; justify-content: center;
           box-shadow: 0 4px 14px rgba(0,0,0,.4); opacity: 0; transform: translateY(-50px); pointer-events: none; }
#ios-ptr svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
#ios-ptr.ready { color: var(--blue); }
#ios-ptr.go svg { animation: ios-spin .7s linear infinite; }


/* 自動で除外中 */
.ax-cnt { font-size: .78rem; font-weight: 500; color: var(--label3); margin-left: 6px; }
.ax-hint { font-size: .74rem; color: var(--label3); line-height: 1.5; margin: 4px 0 10px; }
.ax-sub { font-size: .76rem; font-weight: 700; color: var(--label2); margin: 12px 0 6px; }
.ax-list { background: var(--card2); border-radius: 12px; overflow: hidden; }
.ax-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: .5px solid var(--sep); }
.ax-row:last-child { border-bottom: none; }
.ax-row.released { opacity: .55; }
.ax-main { flex: 1; min-width: 0; }
.ax-name { font-size: .9rem; font-weight: 600; color: var(--label); word-break: break-all; }
.ax-name a { color: var(--blue); text-decoration: none; }
.ax-meta { font-size: .7rem; color: var(--label3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-btn { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: none; background: rgba(255,69,58,.16); color: var(--red); font-size: .78rem; font-weight: 700; cursor: pointer; }
.ax-btn.restore { background: rgba(10,132,255,.16); color: var(--blue); }
.ax-empty { font-size: .82rem; color: var(--label3); padding: 8px 0; }
/* ── 3 グループのナビゲーション ── */
h1 .ios-eyebrow { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--label3); margin-bottom: 2px; }
h1 { line-height: 1.05; }
.tabs.seg { display: block !important; overflow: visible; }
.seg-inner { display: flex; gap: 2px; background: var(--card); border-radius: 10px; padding: 3px; }
.tabs.seg .tab { flex: 1 1 0 !important; min-width: 0; justify-content: center !important; flex-direction: column !important; gap: 0 !important;
                 background: transparent !important; border-radius: 8px !important; padding: 6px 2px !important;
                 font-size: .76rem !important; color: var(--label2) !important; white-space: nowrap; }
.tabs.seg .tab.active { background: var(--card3) !important; color: var(--label) !important; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.tabs.seg .tab-cnt { font-size: .64rem !important; line-height: 1.2; }
.tabs.seg .tab.active .tab-cnt { color: var(--label2) !important; }
.ios-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; justify-content: space-around;
              padding: 6px 8px calc(4px + env(safe-area-inset-bottom));
              background: rgba(22,22,24,.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
              border-top: .5px solid var(--sep); view-transition-name: ios-tabbar; }
.tb-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0;
           color: var(--label3); text-decoration: none; font-size: .64rem; font-weight: 600; letter-spacing: .01em;
           transition: transform .12s ease, color .2s ease; -webkit-user-select: none; user-select: none; }
.tb-item svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tb-item.active { color: var(--blue); }
.tb-item.active svg { fill: rgba(10,132,255,.18); }
.tb-item:active { transform: scale(.9); }
.tb-badge { position: absolute; top: -2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
            background: var(--red); color: #fff; font-size: .66rem; font-weight: 700; line-height: 18px; text-align: center; }
body:has(.ios-tabbar) .bulk-bar { bottom: calc(58px + env(safe-area-inset-bottom)) !important; padding-bottom: 10px !important; }
body:has(.ios-tabbar) { padding-bottom: calc(env(safe-area-inset-bottom) + 120px) !important; }
#ajaxToast { bottom: calc(120px + env(safe-area-inset-bottom)) !important; }

@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; transition: none !important; }
}

/* ══ Recommend：おすすめ度・まとめ・あとで・読み込み・空の表示 ══ */
.rec-score { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.rec-stars { font-size: .82rem; letter-spacing: 1px; color: var(--label3); }
.rec-stars.s4, .rec-stars.s5 { color: var(--yellow); }
.rec-stars.s3 { color: #e6c35c; }
.rec-label { font-size: .66rem; color: var(--label3); }
.rec-fav { font-size: .66rem; font-weight: 700; color: #ff6b8b; background: rgba(255,55,95,.14); border-radius: 6px; padding: 2px 6px; }
.rec-sort { display: inline-flex; gap: 2px; margin: 0 0 10px; padding: 2px; background: var(--card); border-radius: 9px; }
.rec-sort .sort-btn { padding: 5px 14px; border-radius: 7px; font-size: .78rem; font-weight: 600; color: var(--label2); text-decoration: none; background: transparent; }
.rec-sort .sort-btn.active { background: var(--card3); color: var(--label); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.dup-box { margin: 2px 0 10px; background: var(--card2); border-radius: 10px; padding: 8px 10px; }
.dup-box summary { font-size: .76rem; color: var(--blue); cursor: pointer; list-style: none; }
.dup-box summary::-webkit-details-marker { display: none; }
.dup-row { display: flex; gap: 6px; align-items: baseline; padding-top: 7px; font-size: .78rem; line-height: 1.4; }
.dup-row a { color: var(--label2); text-decoration: none; }
.btn-later { width: auto !important; padding: 11px 13px !important; background: var(--card2) !important; color: var(--label2) !important; flex-shrink: 0; font-size: 1rem !important; }
.more-sentinel { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 0 8px; font-size: .78rem; color: var(--label3); }
.more-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--card3); border-top-color: var(--blue); animation: ios-spin .8s linear infinite; }
.empty-state { text-align: center; padding: 56px 20px 40px; animation: ios-rise .35s ease both; }
.es-icon { font-size: 2.6rem; margin-bottom: 10px; }
.es-title { font-size: 1rem; font-weight: 700; color: var(--label); }
.es-sub { font-size: .8rem; color: var(--label3); margin-top: 6px; line-height: 1.5; }
.empty { color: var(--label3) !important; }
/* セグメントが 5 つあるグループは文字を少し小さく */
.tabs.seg.n5 .tab { font-size: .7rem !important; padding: 6px 1px !important; letter-spacing: -.02em; }
.tabs.seg .tab span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ══ 参加候補：ステータス・チケット ══ */
.st-filter { display: flex; gap: 6px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.st-filter .fchip { text-decoration: none; }
.fchip.st-ticket.active { background: var(--green) !important; color: #000 !important; }
.st-pill { font-size: .7rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.st-pill.st-interested { background: rgba(10,132,255,.14); color: #64aaff; }
.st-pill.st-ticket { background: rgba(48,209,88,.16); color: var(--green); }
.tk-badge { font-size: .7rem; border-radius: 6px; padding: 2px 8px; background: var(--card2); color: var(--label2); }
.tk-badge.tk-warn { background: rgba(255,159,10,.18); color: var(--orange); font-weight: 700; }
.tk-badge.tk-danger { background: rgba(255,69,58,.18); color: var(--red); font-weight: 700; }
.tk-badge.tk-past { color: var(--label3); text-decoration: line-through; }
.st-next { display: flex; gap: 6px; margin: 10px 0 8px; clear: both; }
.st-btn { flex: 1; padding: 11px 0; border: none; border-radius: 12px; font-size: .86rem; font-weight: 700; cursor: pointer; }
.st-buy { background: rgba(48,209,88,.16); color: var(--green); }
.st-done { background: var(--green); color: #000; }
.st-back { width: 44px; flex-shrink: 0; border: none; border-radius: 12px; background: var(--card2); color: var(--label2); font-size: .95rem; cursor: pointer; }
.st-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.st-pick label { display: flex !important; align-items: center; gap: 6px; padding: 9px 12px; background: var(--card2); border-radius: 10px; font-size: .84rem !important; color: var(--label) !important; margin: 0 !important; cursor: pointer; }
.st-pick input { width: auto !important; accent-color: var(--blue); }
.field-hint { font-size: .7rem; color: var(--label3); margin-top: 4px; }

/* ══ 参加記録：評価・記録項目 ══ */
.ev-stars { color: var(--yellow); font-size: .8rem; letter-spacing: 1px; }
.ev-facts { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .78rem; color: var(--label2); margin: -2px 0 8px; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 2px; }
.star-input input { display: none; }
.star-input label { font-size: 1.9rem !important; line-height: 1; color: var(--card3) !important; cursor: pointer; margin: 0 !important; padding: 0 2px; transition: transform .1s ease, color .15s; }
.star-input label.star-clear { font-size: .76rem !important; color: var(--label3) !important; margin-left: 10px !important; order: -1; }
.star-input input:checked ~ label:not(.star-clear), .star-input label:not(.star-clear):hover, .star-input label:not(.star-clear):hover ~ label:not(.star-clear) { color: var(--yellow) !important; }
.star-input label:active { transform: scale(.85); }
.two-col { display: flex; gap: 10px; }
.two-col > div { flex: 1; min-width: 0; }
.edit-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 6px; }
.chk-line { display: flex !important; align-items: center; gap: 6px; font-size: .78rem !important; color: var(--label2) !important; margin: 0 0 8px !important; }
.chk-line input { width: auto !important; }
.file-input { font-size: .8rem !important; padding: 10px !important; }

/* ══ 統計 ══ */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border-radius: 16px; padding: 14px; animation: ios-rise .32s ease both; }
.kpi-num { font-size: 1.45rem; font-weight: 800; color: var(--label); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-num small { font-size: .78rem; font-weight: 600; color: var(--label2); margin-left: 2px; }
.kpi-label { font-size: .72rem; color: var(--label3); margin-top: 4px; }
.sx-card { background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 14px; animation: ios-rise .32s ease both; }
.sx-title { font-size: .92rem; font-weight: 700; color: var(--label); margin-bottom: 12px; }
.sx-sub { font-size: .76rem; font-weight: 700; color: var(--label2); margin: 14px 0 6px; }
.vbar-chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; border-bottom: 1px solid var(--sep); }
.vbar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.vbar-fill { width: 70%; max-width: 22px; min-height: 0; background: var(--blue); border-radius: 4px 4px 0 0; transition: height .5s cubic-bezier(.2,.8,.2,1); }
.vbar-val { font-size: .64rem; color: var(--label2); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.vbar-lab { position: absolute; bottom: -18px; font-size: .58rem; color: var(--label3); white-space: nowrap; }
.vbar-chart + * { margin-top: 22px; }
.sx-card .vbar-chart { margin-bottom: 20px; }
.stack-bar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.stack-bar span { min-width: 3px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.lg-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--label); }
.lg-item i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.lg-item b { margin-left: auto; font-weight: 600; color: var(--label2); font-variant-numeric: tabular-nums; }
.lg-item span { font-size: .7rem; color: var(--label3); width: 32px; text-align: right; }
.hbar-row { margin-bottom: 10px; }
.hbar-head { display: flex; align-items: baseline; gap: 6px; font-size: .82rem; margin-bottom: 4px; }
.hbar-rank { width: 16px; color: var(--label3); font-weight: 700; font-size: .74rem; }
.hbar-name { flex: 1; min-width: 0; color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-val { color: var(--label2); font-size: .74rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-track { flex: 1; height: 8px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.hbar-fill.rd { background: var(--yellow); }
.rd-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rd-lab { width: 62px; font-size: .72rem; color: var(--yellow); letter-spacing: 1px; }
.rd-val { width: 22px; text-align: right; font-size: .76rem; color: var(--label2); font-variant-numeric: tabular-nums; }
.best-row { font-size: .82rem; color: var(--label); padding: 5px 0; display: flex; gap: 8px; align-items: baseline; }
.comp-list { display: flex; flex-wrap: wrap; gap: 8px; }
.comp-chip { background: var(--card2); border-radius: 999px; padding: 6px 12px; font-size: .8rem; color: var(--label); }
.comp-chip b { margin-left: 6px; color: var(--label3); font-weight: 600; }

/* ── 設定 ── */
.set-flash { background: rgba(48,209,88,.14); color: var(--green); border-radius: 12px; padding: 10px 14px; font-size: .84rem; margin-bottom: 12px; animation: ios-rise .3s ease both; }
.set-card { background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 14px; animation: ios-rise .32s ease both; scroll-margin-top: 80px; }
.set-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.set-ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; }
.set-title { font-size: .98rem; font-weight: 700; color: var(--label); }
.set-sub { font-size: .74rem; color: var(--label2); margin-top: 2px; line-height: 1.45; }
.set-sub a { color: var(--blue); }
.set-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.set-btn { flex: 1 1 auto; min-height: 44px; padding: 0 16px; border: none; border-radius: 12px; background: var(--card2); color: var(--blue); font-size: .88rem; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.set-btn.primary { background: var(--blue); color: #fff; }
.set-btn:disabled { opacity: .4; }
.set-btn[hidden] { display: none; }
.set-msg { font-size: .78rem; min-height: 1em; margin: 4px 0 6px; color: var(--label2); }
.set-msg.ok { color: var(--green); } .set-msg.ng { color: var(--red); }
.set-prefs { margin: 6px 0 4px; }
.set-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: .5px solid rgba(84,84,88,.45); margin: 0 !important; cursor: pointer; }
.set-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-row b { font-size: .88rem; color: var(--label); font-weight: 600; }
.set-row small { font-size: .72rem; color: var(--label3); line-height: 1.4; }
.set-row form { margin: 0; flex-shrink: 0; }
.ios-switch { -webkit-appearance: none; appearance: none; width: 51px !important; height: 31px; border-radius: 16px; background: rgba(120,120,128,.32); position: relative; flex-shrink: 0; margin: 0 !important; padding: 0 !important; border: none !important; transition: background .2s ease; cursor: pointer; }
.ios-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .2s ease; }
.ios-switch:checked { background: var(--green); }
.ios-switch:checked::after { transform: translateX(20px); }
.set-note { font-size: .72rem; color: var(--label3); line-height: 1.6; margin: 8px 0 2px; }
.set-note b { color: var(--label2); }
.set-url { display: flex; gap: 8px; margin: 6px 0 10px; }
.set-url input { flex: 1; min-width: 0; background: var(--card2); border: none; border-radius: 10px; color: var(--label2); font-size: .74rem; padding: 0 10px; height: 44px; font-family: ui-monospace, Menlo, monospace; }
.set-url .set-btn { flex: 0 0 auto; }
.set-steps { margin: 4px 0 6px 1.2em; padding: 0; font-size: .8rem; color: var(--label2); line-height: 1.75; }
.set-steps b { color: var(--label); }
.set-link { background: none; border: none; padding: 6px 0; font-size: .82rem; color: var(--blue); cursor: pointer; }
.set-link.danger { color: var(--red); }
.set-empty { font-size: .8rem; color: var(--label3); padding: 10px 0; border-top: .5px solid rgba(84,84,88,.45); }

/* ── 状態確認 ── */
.chk-summary { display: flex; gap: 12px; align-items: center; border-radius: 16px; padding: 14px; margin-bottom: 14px; background: var(--card); animation: ios-rise .3s ease both; }
.chk-summary.ok { background: rgba(48,209,88,.12); } .chk-summary.warn { background: rgba(255,159,10,.12); } .chk-summary.ng { background: rgba(255,69,58,.14); }
.chk-big { font-size: 1.6rem; }
.chk-summary b { display: block; font-size: .95rem; color: var(--label); }
.chk-summary small { font-size: .72rem; color: var(--label2); }
.chk-list { background: var(--card); border-radius: 16px; padding: 2px 14px; margin-bottom: 18px; animation: ios-rise .32s ease both; }
.chk-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: .5px solid rgba(84,84,88,.45); }
.chk-row:last-child { border-bottom: none; }
.chk-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.chk-dot.ok { background: var(--green); color: #000; } .chk-dot.warn { background: var(--orange); color: #000; } .chk-dot.ng { background: var(--red); color: #fff; }
.chk-name { font-size: .9rem; font-weight: 600; color: var(--label); }
.chk-detail { font-size: .8rem; color: var(--label2); margin-top: 2px; }
.chk-sub { font-size: .72rem; color: var(--label3); margin-top: 2px; line-height: 1.45; }
.chk-h { margin: 0 4px 8px; }
.chk-errors { background: var(--card); border-radius: 14px; padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: .68rem; color: #ff8a80; line-height: 1.55; overflow-x: auto; margin-bottom: 16px; }
.chk-errors div { white-space: pre-wrap; word-break: break-all; padding: 3px 0; border-bottom: .5px solid rgba(84,84,88,.35); }
.chk-errors div:last-child { border-bottom: none; }
.empty-state.small { padding: 18px 20px; }
.chk-reload { width: 100%; margin: 4px 0 20px; }

/* ── ログイン：Face ID ── */
:where(body.pg-login) .pk-or { text-align: center; font-size: .72rem; color: #777; margin: 16px 0 10px; }
:where(body.pg-login) .pk-btn { background: transparent; border: 1px solid #5865F2; color: #aab0ff; }
:where(body.pg-login) #pkErr { margin: 12px 0 0; }

/* 最新の内容に静かに入れ替えるときは、カードの出現アニメーションを出さない */
html.no-anim *, html.no-anim *::before, html.no-anim *::after { animation: none !important; transition: none !important; }
