/* CAMPUS CLUB Web版。iOSアプリの配色に合わせている。 */
:root {
  --brand: #5B34D6;
  --brand-soft: #F1EDF9;
  --ink: #1F1B2E;
  --muted: #5A5470;
  --paper: #FAF9FC;
  --card: #FFFFFF;
  --line: #E2DCF0;
  --danger: #C0392B;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #A78BFA; --brand-soft: #2A2340; --ink: #F3F1F8; --muted: #B4AECC;
    --paper: #16131F; --card: #211C2F; --line: #342C4A;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px; line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 12px 16px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.appbar__title { font-weight: 700; }
.appbar__button {
  border: 1px solid var(--line); background: var(--card); color: var(--brand);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.screen { padding: 16px 16px 96px; max-width: 760px; margin: 0 auto; }
.screen__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.screen__title { font-size: 26px; margin: 4px 0 14px; }
.section__title { font-size: 18px; margin: 20px 0 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar__item {
  flex: 1; border: 0; background: none; color: var(--muted);
  padding: 12px 4px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.tabbar__item.is-on { color: var(--brand); }

.notice { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--muted); }
.notice--error { border-color: var(--danger); color: var(--danger); }
.spinner { height: 3px; background: linear-gradient(90deg, var(--brand), transparent); border-radius: 3px; animation: slide 1.1s infinite; }
@keyframes slide { 0% { opacity: .3 } 50% { opacity: 1 } 100% { opacity: .3 } }

.notice-strip { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: inherit; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.notice-strip__text { font-size: 15px; }
.banner-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.banner { flex: 0 0 86%; background: var(--brand); color: #fff; border-radius: 18px; padding: 28px 20px; text-decoration: none; }
.banner__title { font-size: 20px; font-weight: 700; margin: 0; }
.banner__sub { margin: 6px 0 0; opacity: .85; font-size: 14px; }

.grid { display: grid; gap: 12px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 380px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: block; }
.card__image { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.card__body { padding: 12px; }
.card__title { margin: 0; font-size: 15px; font-weight: 700; }
.card__sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.tile { display: flex; flex-direction: column; gap: 6px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.tile__image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--brand-soft); display: block; }
.tile__image--empty { display: grid; place-items: center; font-size: 28px; color: var(--brand); }
.tile__title { font-size: 14px; font-weight: 700; }
.tile__sub, .tile__price { font-size: 12px; color: var(--muted); }
.tile__price { color: var(--brand); font-weight: 700; }

.search { width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: inherit; font-size: 16px; margin-bottom: 12px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.picker { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; flex: none; }
.picker__label { font-size: 11px; color: var(--muted); }
.picker__select { border: 0; background: none; color: inherit; font-size: 15px; font-weight: 700; padding: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); color: inherit; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip--link { color: var(--brand); }
.chip--ghost { color: var(--brand); }

.segmented { display: flex; gap: 6px; background: var(--brand-soft); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.segmented__item { flex: 1; border: 0; background: none; color: var(--muted); border-radius: 999px; padding: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }
.segmented__item.is-on { background: var(--card); color: var(--brand); }

/* 地図は中で z-index を高く使うため、ひとつの層に閉じ込める。
   そうしないと、上に出したシートや画面を突き抜けて見えてしまう。 */
.map { position: relative; z-index: 0; isolation: isolate; height: 46vh; min-height: 260px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-list { margin-top: 12px; }
.venue { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.venue__name { font-weight: 700; font-size: 15px; }
.venue__meta { color: var(--muted); font-size: 13px; margin-right: auto; }
.venue__badge { color: var(--brand); font-size: 12px; font-weight: 700; }

.row { display: flex; gap: 12px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.row__label { color: var(--muted); font-size: 14px; flex: none; }
.row__value { font-size: 14px; text-align: right; }
.row__value--link { color: var(--brand); text-decoration: none; }
.block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.block--accent { border-color: var(--brand); }
.block__label { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.block__body { margin: 0; white-space: pre-wrap; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.plan { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan__name { margin: 0; font-weight: 700; font-size: 15px; }
.plan__prices { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

.button { width: 100%; border: 0; background: var(--brand); color: #fff; border-radius: var(--radius); padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; display: block; }
.button--ghost { background: var(--card); color: var(--brand); border: 1px solid var(--line); }
.button--quiet { background: none; color: var(--muted); border: 0; font-weight: 600; font-size: 13px; }
.button--danger { background: none; color: var(--danger); border: 1px solid var(--line); }
.button.is-on { border-color: var(--brand); }
.button:disabled { opacity: .5; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field__label { font-size: 12px; color: var(--muted); }
.input { width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: inherit; font-size: 16px; font-family: inherit; }
.input--area { resize: vertical; }
.setup { display: flex; flex-direction: column; gap: 14px; }

/* シートは全画面の枠（.panel）より手前。枠を出すときは、開いているシートを閉じている。 */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(20,16,32,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 760px; max-height: 88vh; background: var(--paper); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
.sheet__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet__title { font-size: 17px; margin: 0; }
.sheet__close { border: 0; background: none; color: var(--brand); font-size: 15px; font-weight: 700; cursor: pointer; }
.sheet__body { overflow-y: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.sheet__photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }

/* プロフィール（団体・店舗）。全画面で出す。 */
.panel { position: fixed; inset: 0; z-index: 50; background: var(--paper); overflow-y: auto; }
.panel__bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: 10px 14px; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent); }
.panel__back, .panel__share { border: 0; background: rgba(20,16,32,.55); color: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); }
.panel__body { max-width: 760px; margin: -54px auto 0; padding: 0 16px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }

.cover { position: relative; margin: 0 -16px; }
.cover__image { width: 100%; height: 210px; object-fit: cover; display: block; }
.cover__image--empty { background: linear-gradient(140deg, #2B2140, #5B34D6); }
.cover__name { position: absolute; left: 16px; right: 16px; bottom: 56px; margin: 0; color: #fff; font-size: 30px; font-weight: 800; line-height: 1.15; text-shadow: 0 2px 12px rgba(0,0,0,.5); }

.profile__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -44px; }
.avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 4px solid var(--paper); background: var(--brand-soft); display: block; }
.avatar--empty { display: grid; place-items: center; font-size: 34px; font-weight: 800; color: var(--brand); }
.profile__actions { display: flex; gap: 8px; padding-bottom: 6px; }
.button--pill { width: auto; border-radius: 999px; padding: 10px 22px; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.button--pill.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }

.profile__title { font-size: 26px; margin: 8px 0 0; line-height: 1.25; }
.profile__tagline { margin: 0; color: var(--muted); }
.profile__about { margin: 0; white-space: pre-wrap; }
.profile__meta { margin: 0; color: var(--muted); font-size: 14px; }

.daymark { margin: 18px 0 2px; font-size: 19px; font-weight: 800; }
.daymark__weekday { color: var(--muted); font-weight: 600; font-size: 15px; }
.erow { width: 100%; display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.erow__image { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; flex: none; background: var(--brand-soft); }
.erow__image--empty { display: grid; place-items: center; font-size: 26px; }
.erow__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.erow__organizer { font-size: 12px; color: var(--muted); }
.erow__title { font-size: 15px; font-weight: 700; }
.erow__meta { font-size: 12px; color: var(--muted); }
.erow__price { font-size: 12px; font-weight: 700; color: var(--brand); }
.picker__select--block { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.panel__bar--solid { background: var(--paper); border-bottom: 1px solid var(--line); align-items: center; }
.panel__bar--solid .panel__back { background: var(--card); color: var(--brand); border: 1px solid var(--line); }
.panel__heading { font-weight: 700; }
.panel__body--plain { margin-top: 16px; }

/* 学生証の写真を選ぶところ */
.stack--tight { gap: 8px; margin-bottom: 12px; }
.notice-strip--tap { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.slot { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.slot.is-filled { border-color: var(--brand); }
.slot__input { display: none; }
.slot__preview { width: 76px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 22px; overflow: hidden; }
.slot__image { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot__title { font-size: 15px; font-weight: 700; }

/* 切り抜き */
.cropper { position: fixed; inset: 0; z-index: 70; background: #000; display: flex; flex-direction: column; }
.cropper__stage { flex: 1; display: grid; place-items: center; padding: 16px; touch-action: none; overflow: hidden; }
.cropper__canvas { border-radius: 12px; box-shadow: 0 0 0 2px rgba(255,255,255,.9); max-width: 100%; cursor: grab; }
.cropper__canvas:active { cursor: grabbing; }
.cropper__hint { color: rgba(255,255,255,.85); font-size: 13px; text-align: center; margin: 0 16px 12px; }
.cropper__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px 32px; }
.cropper__cancel { background: none; border: 0; color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.cropper__done { background: #fff; border: 0; color: #000; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 700; cursor: pointer; }

/* 登録・編集 */
.slot__body { display: flex; flex-direction: column; gap: 2px; }
.slot__note { font-size: 12px; color: var(--muted); }
.slot__preview--wide { width: 96px; height: 54px; }
.toggle { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.toggle__box { width: 20px; height: 20px; accent-color: var(--brand); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }

/* 学生証の確認 */
.review__photos { display: flex; gap: 10px; flex-wrap: wrap; }
.review__photo { display: flex; flex-direction: column; gap: 4px; flex: 1 1 45%; }
.review__image { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.hour { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.hour__day { width: 24px; font-weight: 700; }
.hour__time { padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; }
.hour__closed { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-left: auto; }

/* イベントの見出しと、押せることの並び */
.event-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.event-head__organizer { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.event-head__when { margin: 0; font-size: 14px; color: var(--muted); }
.badge { font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 8px; background: var(--brand-soft); color: inherit; }
.badge--free { background: rgba(52, 168, 83, .15); color: #2e7d43; }
.tile-row { display: flex; gap: 10px; }
/* 白い紙の上でも面が見えるよう、押せるほうは薄く色を敷く */
.action-tile { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--brand-soft); color: inherit; border-radius: 14px; padding: 14px 8px; font: inherit; cursor: pointer; text-decoration: none; }
.action-tile--filled { background: var(--brand); color: #fff; }
.action-tile.is-on { color: var(--brand); }
.action-tile__icon { font-size: 17px; line-height: 1; }
.action-tile__label { font-size: 13px; font-weight: 700; white-space: nowrap; }

/* クーポン */
.coupon { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; }
.coupon--used, .coupon--ended { border-left-color: var(--line); opacity: .6; cursor: default; }
.coupon__body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.coupon__tags { display: flex; gap: 6px; }
.coupon__kind { align-self: flex-start; font-size: 11px; font-weight: 700; color: #fff; background: var(--muted); border-radius: 999px; padding: 3px 9px; }
.coupon__kind--exclusive { background: var(--brand); }
.coupon__title { margin: 0; font-size: 15px; font-weight: 700; }
.coupon__period { margin: 0; font-size: 12px; color: var(--muted); }
.coupon__state { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--brand-soft); border-radius: 999px; padding: 3px 9px; }

.ticket { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--brand); border-radius: 18px; padding: 26px 20px; text-align: center; }
.ticket--used { border-color: var(--line); opacity: .6; }
.ticket__title { margin: 0; font-size: 22px; font-weight: 700; }
.ticket__venue { margin: 0; font-size: 14px; color: var(--muted); }
.ticket hr { width: 60%; border: 0; border-top: 1px solid var(--line); margin: 2px 0; }
.ticket__period { margin: 0; font-size: 13px; color: var(--muted); }
.ticket__stamp { position: absolute; top: 44%; font-size: 22px; font-weight: 800; color: var(--muted); background: var(--paper); border-radius: 999px; padding: 6px 18px; transform: rotate(-12deg); }
.login-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 14px 16px; }
.login-choice__title { font-size: 15px; font-weight: 700; }
.login-choice__summary { font-size: 12px; font-weight: 400; color: var(--muted); }
.coupon__logo { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 700; overflow: hidden; }
.coupon__logo-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.empty { text-align: center; padding: 32px 16px; }
.empty__title { margin: 0; font-size: 15px; font-weight: 700; color: var(--muted); }
.empty__body { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* 口コミ */
.profile__rating:empty { display: none; }
.profile__rating { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; }
.profile__score { font-size: 15px; font-weight: 700; }
.stars { display: inline-flex; gap: 1px; font-size: 13px; letter-spacing: -.5px; }
.stars__item { color: var(--line); }
.stars__item.is-on { color: #f0a020; }
.axis { display: flex; align-items: center; gap: 10px; }
.axis__title { font-size: 12px; color: var(--muted); width: 72px; flex: none; }
.axis__bar { flex: 1; height: 6px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.axis__fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.axis__fill--overall { background: #f0a020; }
.axis__value { font-size: 12px; font-weight: 700; width: 28px; text-align: right; }
.review__head { display: flex; align-items: center; gap: 8px; }
.review__date { margin-left: auto; }
.star-button { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--line); cursor: pointer; padding: 0 2px; }
.star-button.is-on { color: #f0a020; }

/* 営業中かどうかを先に出す。曜日ごとの一覧は、今日だけ濃くする。 */
.hours__state { margin: 2px 0 8px; font-weight: 700; color: var(--muted); }
.hours__state.is-open { color: #1a7f37; }
.row--today .row__label,
.row--today .row__value { color: var(--ink); font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .hours__state.is-open { color: #4ac26b; }
}

/* 会員の集計。パソコンで見る前提なので、横に伸びても読めるようにする。 */
.stat { text-align: center; padding: 18px 0 6px; }
.stat__value { font-size: 44px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat__label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.bar { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.bar__name { width: 140px; flex: none; font-size: 13px; }
.bar__track { flex: 1; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.bar__value { width: 110px; flex: none; text-align: right; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .bar__name { width: 92px; }
  .bar__value { width: 86px; }
}
