    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      background: #F5F0E8;
      color: #2A2418;
      font-family: 'Noto Sans JP', sans-serif;
      min-height: 100vh;
      padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }

    /* ── Header ── */
    #header {
      background: #F5F0E8;
      border-bottom: 1px solid #E0D8C8;
      padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 14px;
      position: sticky; top: 0; z-index: 100;
    }
    #header .inner, #sub-header .inner { max-width: 640px; margin: 0 auto; }
    #header .top-row, #sub-header .top-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 12px; padding: 2px 0; }

    .header-label { font-size: 10px; letter-spacing: .3em; color: #A89880; text-transform: uppercase; margin-bottom: 3px; }
    #header h1 { font-size: 22px; font-weight: 900; letter-spacing: -.02em; color: #2A2418; }
    #header h1 span { color: #C87941; }

    /* ── FAB Speed Dial ── */
    .fab-wrap { position: fixed; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); right: 20px; z-index: 150; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
    .fab-main { width: 56px; height: 56px; border-radius: 50%; background: #C87941; border: none; color: #fff; font-size: 28px; cursor: pointer; box-shadow: 0 4px 16px rgba(200,121,65,.45); display: flex; align-items: center; justify-content: center; transition: transform .25s; flex-shrink: 0; -webkit-tap-highlight-color: transparent; }
    .fab-main.open { transform: rotate(45deg); }
    .fab-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; transform: translateY(8px); }
    .fab-actions.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
    .fab-item { display: flex; align-items: center; gap: 10px; }
    .fab-label { background: #2A2418cc; color: #fff; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 8px; white-space: nowrap; }
    .fab-btn { width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.18); font-size: 18px; background: #FFFDF8; -webkit-tap-highlight-color: transparent; }

    /* ── Sub-action row ── */
    .sub-row {
      display: flex; gap: 8px; margin-bottom: 10px; align-items: center;
    }
    .btn-sub {
      background: #EDE6D8; border: 1px solid #D8CEBC;
      border-radius: 10px; color: #6B5C48;
      padding: 7px 13px; font-size: 12px; font-weight: 700;
      cursor: pointer; font-family: inherit; display: inline-block;
    }
    .btn-sub:active { background: #E0D6C4; }

    /* ── Search ── */
    .search-wrap { position: relative; margin-bottom: 10px; }
    .search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #A89880; pointer-events: none; }
    #search-input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid #D8CEBC; border-radius: 10px; background: #FFFDF8; font-size: 13px; font-family: inherit; color: #2A2418; outline: none; }
    #search-input:focus { border-color: #C87941; }
    #search-input::placeholder { color: #C4B8A8; }

    /* ── Filter tabs ── */
    .filters-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .filters-wrap::-webkit-scrollbar { display: none; }
    .filters { display: flex; gap: 6px; flex-wrap: nowrap; width: max-content; }
    .filters::after { content: ''; min-width: 16px; flex-shrink: 0; }
    @media (min-width: 600px) {
      .filters-wrap { padding-bottom: 6px; }
      .filters-wrap::-webkit-scrollbar { display: block; height: 8px; }
      .filters-wrap::-webkit-scrollbar-thumb { background: #D8CEBC; border-radius: 4px; }
      .filters-wrap::-webkit-scrollbar-track { background: transparent; }
    }
    .filter-btn {
      background: #EDE6D8; border: 1px solid #D8CEBC;
      border-radius: 20px; padding: 5px 14px;
      font-size: 12px; font-weight: 600; color: #8B7A68;
      cursor: pointer; font-family: inherit; white-space: nowrap;
      transition: all .15s;
    }
    .filter-btn.active {
      background: #C87941; border-color: #C87941; color: #fff;
      box-shadow: 0 2px 6px rgba(200,121,65,.3);
    }

    /* ── Cards ── */
    #cards { max-width: 640px; margin: 0 auto; padding: 16px; }
    .empty { text-align: center; padding: 60px 0; color: #B0A090; }
    .empty .emoji { font-size: 40px; margin-bottom: 12px; display:flex; justify-content:center; } .empty .emoji svg { width:48px; height:48px; }

    .card {
      background: #FFFDF8;
      border-radius: 18px; margin-bottom: 10px;
      overflow: hidden; position: relative;
      border: 1px solid #E8E0D0;
      box-shadow: 0 2px 8px rgba(0,0,0,.06);
      cursor: pointer;
      transition: transform .12s, box-shadow .12s;
      -webkit-tap-highlight-color: transparent;
    }
    .card:active { transform: scale(.985); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
    .card .accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 18px 0 0 18px; }
    .card-body { padding: 14px 16px 14px 20px; }

    .card-top { display: flex; align-items: flex-start; justify-content: space-between; }
    .card-icon-wrap {
      width: 44px; height: 44px; border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .card-icon-wrap svg {
      width: 22px; height: 22px;
    }
    .card-title-group { margin-left: 10px; flex: 1; min-width: 0; }
    .card-service { font-size: 11px; color: #A89880; margin-bottom: 1px; }
    .card-type { font-size: 15px; font-weight: 700; color: #2A2418; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card-cat-tag {
      display: inline-block; font-size: 10px; font-weight: 700;
      padding: 2px 7px; border-radius: 5px; margin-top: 4px;
      background: #EDE6D8; color: #8B7A68; border: 1px solid #D8CEBC;
    }

    .card-right { text-align: right; flex-shrink: 0; margin-left: 10px; }
    .days-badge {
      display: inline-block; border-radius: 8px;
      padding: 3px 9px; font-size: 11px; font-weight: 700; margin-bottom: 4px;
    }
    .card-amount { font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
    .card-unit { font-size: 11px; font-weight: 500; color: #A89880; margin-left: 2px; }

    .card-footer {
      margin-top: 10px;
      display: flex; align-items: center; justify-content: space-between;
      padding-top: 10px; border-top: 1px solid #EDE6D8;
    }
    .card-date { font-size: 12px; color: #8B7A68; }
    .card-arrow { font-size: 14px; color: #C8B89A; }
    .card-note { margin-top: 8px; font-size: 11px; color: #A89880; }
    .btn-campaign { display: inline-flex; align-items: center; gap: 3px; background: #000; color: #fff; border: none; border-radius: 6px; padding: 3px 8px; font-size: 10px; font-weight: 700; cursor: pointer; font-family: inherit; }
    .btn-campaign svg { width: 10px; height: 10px; flex-shrink: 0; }
    .btn-calendar { display: inline-flex; align-items: center; gap: 3px; background: #4285F4; color: #fff; border: none; border-radius: 6px; padding: 3px 8px; font-size: 10px; font-weight: 700; cursor: pointer; font-family: inherit; }
    .btn-calendar svg { width: 10px; height: 10px; flex-shrink: 0; }

    /* urgency styles */
    .card.expired  { border-color: #F0C8C0; background: #FFF8F7; }
    .card.critical { border-color: #F0DEC0; background: #FFFBF5; }
    .card.warning  { background: #FFFDF8; }
    .card.safe     { background: #FFFDF8; }
    .card.used     { border-color: #E0D8C8; background: #F5F0E8; opacity: .7; }

    /* ── Modal / Sheet ── */
    .overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(42,36,24,.5); z-index: 200;
      backdrop-filter: blur(6px);
      align-items: flex-end; justify-content: center;
    }
    .overlay.show { display: flex; }
    .sheet {
      background: #FFFDF8;
      border-radius: 24px 24px 0 0;
      border-top: 1px solid #E8E0D0;
      padding: 24px 20px 32px;
      width: 100%; max-width: 640px;
      max-height: 92vh; overflow-y: auto;
    }
    .sheet-handle {
      width: 36px; height: 4px; background: #D8CEBC;
      border-radius: 2px; margin: 0 auto 20px;
    }
    .sheet h2 { font-size: 18px; font-weight: 900; margin-bottom: 20px; color: #2A2418; }

    label.field-label {
      display: block; font-size: 11px; color: #A89880;
      letter-spacing: .05em; margin-bottom: 5px; font-weight: 700;
    }
    input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], select {
      width: 100%; background: #F5F0E8; border: 1px solid #E0D8C8;
      border-radius: 12px; color: #2A2418; padding: 11px 14px;
      font-size: 14px; font-family: inherit; margin-bottom: 14px;
      -webkit-appearance: none;
    }
    input:focus, select:focus { outline: none; border-color: #C87941; box-shadow: 0 0 0 3px rgba(200,121,65,.15); }
    select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A89880' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
    input[type=color] {
      width: 56px; height: 44px; background: #F5F0E8;
      border: 1px solid #E0D8C8; border-radius: 12px;
      padding: 4px; cursor: pointer; margin-bottom: 14px;
    }
    .row2 { display: flex; gap: 10px; }
    .row2 > div { flex: 1; }

    .modal-btns { display: flex; gap: 10px; margin-top: 4px; }
    .btn-cancel {
      flex: 1; background: #EDE6D8; border: 1px solid #D8CEBC;
      border-radius: 14px; color: #6B5C48; padding: 13px;
      font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700;
    }
    .btn-save {
      flex: 2; background: #C87941;
      border: none; border-radius: 14px; color: #fff; padding: 13px;
      font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700;
      box-shadow: 0 2px 8px rgba(200,121,65,.35);
    }
    .btn-duplicate {
      width: 100%; background: #EDE6D8; border: 1px solid #D8CEBC;
      border-radius: 14px; color: #6B5C48; padding: 13px;
      font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700;
      margin-top: 10px;
    }
    .btn-delete-full {
      width: 100%; background: #FFF0EE; border: 1px solid #F0C8C0;
      border-radius: 14px; color: #C0392B; padding: 13px;
      font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700;
      margin-top: 10px;
    }

    /* ── Category Manager ── */
    .cat-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .cat-item input[type=text] { margin-bottom: 0; flex: 1; }
    .btn-cat-del {
      background: #FFF0EE; border: 1px solid #F0C8C0;
      border-radius: 10px; color: #C0392B; padding: 10px 12px;
      font-size: 12px; cursor: pointer; font-family: inherit; white-space: nowrap;
    }
    .btn-cat-add {
      width: 100%; background: #EDE6D8; border: none;
      border-radius: 12px; color: #8B7A68; padding: 11px;
      font-size: 13px; font-weight: 700; cursor: pointer;
      font-family: inherit; margin-bottom: 16px;
    }

    /* ── Delete confirm ── */
    #overlay-del {
      display: none; position: fixed; inset: 0;
      background: rgba(42,36,24,.6); z-index: 400;
      backdrop-filter: blur(6px);
      align-items: center; justify-content: center; padding: 0 24px;
    }
    #overlay-del.show { display: flex; }
    .del-box {
      background: #FFFDF8; border-radius: 22px; padding: 28px;
      width: 100%; max-width: 340px;
      border: 1px solid #F0C8C0;
      box-shadow: 0 16px 48px rgba(0,0,0,.15);
      text-align: center;
    }
    .del-icon {
      font-size: 36px; margin-bottom: 12px; display:flex; justify-content:center;
    }
    .del-box h3 { font-size: 17px; font-weight: 900; margin-bottom: 8px; color: #2A2418; }
    .del-box p { font-size: 13px; color: #8B7A68; line-height: 1.7; margin-bottom: 20px; }
    .del-box p strong { color: #2A2418; }
    .del-btns { display: flex; gap: 10px; }
    .btn-del-cancel {
      flex: 1; background: #EDE6D8; border: 1px solid #D8CEBC;
      border-radius: 12px; color: #6B5C48; padding: 12px;
      font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700;
    }
    .btn-del-ok {
      flex: 1; background: #C0392B;
      border: none; border-radius: 12px; color: #fff; padding: 12px;
      font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700;
    }

    /* ── Weekly Digest Summary ── */
    #overlay-digest {
      display: none; position: fixed; inset: 0;
      background: rgba(42,36,24,.6); z-index: 400;
      backdrop-filter: blur(6px);
      align-items: center; justify-content: center; padding: 0 24px;
    }
    #overlay-digest.show { display: flex; }
    .digest-box {
      background: #FFFDF8; border-radius: 22px; padding: 28px;
      width: 100%; max-width: 340px;
      border: 1px solid #E8E0D0;
      box-shadow: 0 16px 48px rgba(0,0,0,.15);
      text-align: center;
    }
    .digest-box h3 { font-size: 17px; font-weight: 900; margin-bottom: 16px; color: #2A2418; }
    .btn-digest-ok {
      width: 100%; background: #C87941; border: none; border-radius: 12px;
      color: #fff; padding: 12px; font-size: 14px; font-weight: 700;
      cursor: pointer; font-family: inherit; margin-top: 20px;
      box-shadow: 0 2px 8px rgba(200,121,65,.3);
    }

    /* ── Logo ── */
    .logo-wrap { display: flex; align-items: center; }
    .logo-text {
      font-family: 'Nunito', 'Noto Sans JP', sans-serif;
      font-size: 28px;
      font-weight: 800;
      color: #F07B6A;
      letter-spacing: -0.01em;
    }

    #brand-splash {
      position: fixed; inset: 0; z-index: 99999;
      background: #F5F0E8;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
      transition: opacity .45s ease;
    }
    #brand-splash.hide { opacity: 0; pointer-events: none; }
    #brand-splash-sub {
      font-family: 'Noto Sans JP', sans-serif;
      font-size: clamp(13px, 3.6vw, 17px);
      font-weight: 700;
      color: #A89880;
      letter-spacing: 0.02em;
    }

    /* ── Toast ── */
    #toast {
      display: none; position: fixed; bottom: 72px;
      left: 50%; transform: translateX(-50%);
      border-radius: 14px; padding: 11px 22px;
      font-size: 13px; font-weight: 700; z-index: 3000;
      box-shadow: 0 8px 24px rgba(0,0,0,.15);
      white-space: nowrap;
    }
    #toast.show { display: block; }
    #toast.success { background: #2D6A4F; color: #fff; }
    #toast.error   { background: #C0392B; color: #fff; }
    #toast.info    { background: #4A3F30; color: #fff; }

    /* ── Icon Picker ── */
    .icon-picker-wrap { margin-bottom: 14px; }
    .icon-picker-label { font-size: 11px; color: #A89880; letter-spacing: .05em; margin-bottom: 8px; font-weight: 700; display: block; }
    .icon-picker-grid {
      display: grid; grid-template-columns: repeat(auto-fill, 38px); gap: 6px;
    }
    .color-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, 28px); gap: 6px; margin-bottom: 14px; }
    .color-swatch { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; outline: 2px solid transparent; outline-offset: 2px; cursor: pointer; padding: 0; transition: transform .15s, outline-color .15s; }
    .color-swatch:hover { transform: scale(1.15); }
    .color-swatch.selected { outline-color: #2A2418; transform: scale(1.1); }
    .icon-option {
      width: 100%; aspect-ratio: 1; border-radius: 10px;
      background: #F5F0E8; border: 2px solid transparent;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; transition: all .15s; padding: 0;
    }
    .icon-option svg { width: 20px; height: 20px; }
    .icon-option:active { transform: scale(.92); }
    .icon-option.selected { border-color: #C87941; background: #FDF0E4; }

    /* ── Auth Screen ── */
    #auth-screen {
      position: fixed; inset: 0; z-index: 2000;
      background: #F5F0E8;
      display: flex; align-items: flex-start; justify-content: center;
      padding: 120px 24px 40px;
      overflow-y: auto;
    }
    #auth-screen.hidden { display: none; }
    .auth-inner { width: 100%; max-width: 360px; }
    .auth-logo-wrap { text-align: center; margin-bottom: 8px; }
    .auth-tagline { text-align: center; font-size: 12px; color: #A89880; margin-bottom: 28px; }
    .auth-card { background: #FFFDF8; border-radius: 20px; padding: 24px; border: 1px solid #E8E0D0; box-shadow: 0 4px 20px rgba(0,0,0,.07); }
    .auth-tabs { display: flex; background: #EDE6D8; border-radius: 12px; padding: 4px; margin-bottom: 20px; gap: 4px; }
    .auth-tab { flex: 1; background: transparent; border: none; border-radius: 9px; padding: 8px; font-size: 13px; font-weight: 700; color: #8B7A68; cursor: pointer; font-family: inherit; transition: all .15s; }
    .auth-tab.active { background: #FFFDF8; color: #2A2418; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
    .auth-error { font-size: 12px; color: #C0392B; margin-bottom: 10px; min-height: 18px; text-align: center; }
    .auth-success { font-size: 13px; font-weight: 700; color: #2D6A4F; background: #EAF7F0; border: 1px solid #B7DFC9; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; text-align: center; }
    .btn-auth-submit { width: 100%; background: #C87941; border: none; border-radius: 14px; color: #fff; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: 0 2px 8px rgba(200,121,65,.35); margin-bottom: 16px; }
    .btn-auth-submit:disabled { opacity: .6; cursor: default; }
    .auth-divider { text-align: center; font-size: 11px; color: #C4B8A8; margin-bottom: 16px; position: relative; }
    .auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: #E0D8C8; }
    .auth-divider::before { left: 0; }
    .auth-divider::after { right: 0; }
    .btn-google { width: 100%; background: #FFFDF8; border: 1px solid #D8CEBC; border-radius: 14px; color: #2A2418; padding: 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 8px; }
    .btn-google:hover { background: #F5F0E8; }
    .auth-forgot { text-align: center; margin-top: 16px; }
    .auth-forgot a { font-size: 12px; color: #A89880; }
    .btn-logout { background: none; border: none; color: #A89880; font-size: 11px; cursor: pointer; font-family: inherit; padding: 4px 8px; border-radius: 6px; }
    .btn-logout:hover { background: #EDE6D8; }
    .account-info-box { background: #F5F0E8; border-radius: 12px; padding: 12px 14px; margin-bottom: 20px; }
    .account-info-box .label { font-size: 10px; color: #A89880; font-weight: 700; letter-spacing: .05em; margin-bottom: 4px; }
    .account-info-box .value { font-size: 13px; color: #2A2418; font-weight: 500; word-break: break-all; }
    .account-section { border-top: 1px solid #EDE6D8; padding-top: 18px; margin-top: 4px; margin-bottom: 18px; }
    .account-section h3 { font-size: 13px; font-weight: 700; color: #2A2418; margin-bottom: 12px; }
    .notif-chips { display: flex; flex-wrap: wrap; gap: 8px; }
    .notif-chip { border: 1px solid #D8CEBC; background: #fff; color: #6B5C48; border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
    .notif-chip.active { background: #C87941; border-color: #C87941; color: #fff; box-shadow: 0 2px 8px rgba(200,121,65,.3); }
    .account-msg { font-size: 12px; margin-top: -8px; margin-bottom: 10px; min-height: 18px; }
    .account-msg.error { color: #C0392B; }
    .account-msg.success { font-size: 13px; font-weight: 700; color: #2D6A4F; background: #EAF7F0; border: 1px solid #B7DFC9; border-radius: 10px; padding: 10px 14px; text-align: center; margin-top: 0; }
    .btn-account-action { width: 100%; background: #EDE6D8; border: 1px solid #D8CEBC; border-radius: 12px; color: #6B5C48; padding: 11px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; margin-bottom: 8px; }
    .btn-account-danger { width: 100%; background: #FFF0EE; border: 1px solid #F0C8C0; border-radius: 12px; color: #C0392B; padding: 11px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
    .btn-account-primary { width: 100%; background: #C87941; border: none; border-radius: 12px; color: #fff; padding: 11px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: 0 2px 8px rgba(200,121,65,.3); }
    #overlay-reauth { display: none; position: fixed; inset: 0; background: rgba(42,36,24,.6); z-index: 600; backdrop-filter: blur(6px); align-items: center; justify-content: center; padding: 0 24px; }
    #overlay-reauth.show { display: flex; }

    /* ── Tutorial ── */
    #tutorial-overlay {
      position: fixed; inset: 0; z-index: 1000;
      background: #F5F0E8;
      display: flex; flex-direction: column;
      align-items: center; justify-content: space-between;
      padding: 48px 24px 40px;
    }
    #tutorial-overlay.hidden { display: none; }
    .tut-slides { width: 100%; max-width: 400px; flex: 1; display: flex; align-items: center; overflow: hidden; }
    .tut-track { display: flex; width: 100%; transition: transform .35s cubic-bezier(.4,0,.2,1); }
    .tut-slide { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; flex: 0 0 100%; width: 100%; }
    .tut-preview { width: 100%; display: flex; justify-content: center; margin-bottom: 4px; }
    .tut-title { font-size: 22px; font-weight: 900; color: #2A2418; line-height: 1.3; }
    .tut-title span { color: #C87941; }
    .tut-desc { font-size: 13px; color: #6B5C48; line-height: 1.8; max-width: 320px; }
    .tut-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
    .tut-dot { width: 8px; height: 8px; border-radius: 50%; background: #D8CEBC; transition: background .2s, width .2s; }
    .tut-dot.active { background: #C87941; width: 24px; border-radius: 4px; }
    .tut-btns { display: flex; gap: 12px; width: 100%; max-width: 400px; }
    .tut-btn-skip { flex: 1; background: transparent; border: 1px solid #D8CEBC; border-radius: 14px; color: #8B7A68; padding: 14px; font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700; -webkit-tap-highlight-color: transparent; }
    .tut-btn-next { flex: 1; background: #C87941; border: none; border-radius: 14px; color: #fff; padding: 14px; font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700; box-shadow: 0 2px 12px rgba(200,121,65,.4); -webkit-tap-highlight-color: transparent; }

    /* ── Bottom Nav ── */
    #bottom-nav { position: fixed; bottom: env(safe-area-inset-bottom, 0px); left: 0; right: 0; z-index: 200; background: #FFFDF8; border-top: 1px solid #E0D8C8; display: none; height: 60px; }
    #bottom-nav.visible { display: flex; }
    /* 下部バナー広告表示時はナビ・FAB・本文をバナー実寸＋余白ぶん持ち上げて重ならないようにする */
    body.banner-on { padding-bottom: calc(100px + var(--banner-h, 50px) + 12px + env(safe-area-inset-bottom, 0px)); }
    body.banner-on #bottom-nav { bottom: calc(var(--banner-h, 50px) + 12px + env(safe-area-inset-bottom, 0px)); }
    body.banner-on .fab-wrap { bottom: calc(76px + var(--banner-h, 50px) + 12px + env(safe-area-inset-bottom, 0px)); }
    /* 画面下端〜ナビ下端の帯を背景色で塗り、バナー上下の隙間に内容が透けないようにする
       （バナーはネイティブで最前面に描画されるため中央部分はバナーが覆う） */
    body.banner-on::after {
      content: ''; position: fixed; left: 0; right: 0; bottom: 0;
      height: calc(var(--banner-h, 50px) + 12px + env(safe-area-inset-bottom, 0px));
      background: #F5F0E8; z-index: 199;
    }
    .bnav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: none; background: transparent; cursor: pointer; font-family: inherit; font-size: 10px; color: #A89880; font-weight: 700; -webkit-tap-highlight-color: transparent; }
    .bnav-btn.active { color: #C87941; }
    .bnav-btn svg { width: 22px; height: 22px; }

    /* ── Subscription Page ── */
    #sub-header { background: #F5F0E8; border-bottom: 1px solid #E0D8C8; padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 14px; position: sticky; top: 0; z-index: 100; }
    #page-coupon.hidden { display: none; }
    #page-sub { display: none; }
    #page-sub.active { display: block; }
    .sub-page-inner { max-width: 640px; margin: 0 auto; padding: 16px 16px 100px; }
    .sub-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-top: 8px; }
    .sub-page-header h2 { font-size: 20px; font-weight: 900; color: #2A2418; }
    .btn-add-sub { background: #C87941; color: #fff; border: none; border-radius: 12px; padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
    .sub-summary-box { background: #FFFDF8; border: 1px solid #E8E0D0; border-radius: 14px; margin-bottom: 16px; display: flex; flex-wrap: wrap; }
    .sub-summary-item { flex: 1; min-width: 120px; text-align: center; padding: 14px 8px; border-right: 1px solid #E8E0D0; border-bottom: 1px solid #E8E0D0; }
    .sub-summary-item:last-child { border-right: none; }
    .sub-summary-label { font-size: 10px; color: #A89880; font-weight: 700; letter-spacing: .05em; margin-bottom: 4px; }
    .sub-summary-value { font-size: 20px; font-weight: 900; color: #2A2418; }
    .sub-summary-unit { font-size: 11px; font-weight: 500; color: #8B7A68; }
    .btn-report-link { display: block; margin: 8px 0 0 auto; background: none; border: none; color: #C87941; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; padding: 4px 2px; }
    .report-chart { display: flex; align-items: flex-end; gap: 8px; height: 140px; margin: 20px 0; padding: 0 4px; }
    .report-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
    .report-bar { width: 100%; max-width: 32px; background: #C87941; border-radius: 6px 6px 0 0; min-height: 2px; }
    .report-bar-value { font-size: 9px; color: #8B7A68; margin-bottom: 4px; font-weight: 700; white-space: nowrap; }
    .report-bar-label { font-size: 10px; color: #A89880; margin-top: 6px; }
    .sub-card { background: #FFFDF8; border-radius: 16px; border: 1px solid #E8E0D0; margin-bottom: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); display: flex; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .sub-accent { width: 5px; flex-shrink: 0; }
    .sub-body { padding: 14px 14px 12px; flex: 1; min-width: 0; }
    .sub-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
    .sub-name { font-size: 16px; font-weight: 800; color: #2A2418; }
    .sub-note { font-size: 11px; color: #A89880; margin-top: 2px; }
    .sub-price { font-size: 20px; font-weight: 900; letter-spacing: -.02em; text-align: right; }
    .sub-price-unit { font-size: 11px; font-weight: 500; }
    .sub-renewal-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
    .sub-renewal-date { font-size: 12px; color: #6B5C48; margin-bottom: 3px; }
    .sub-days-badge { font-size: 11px; font-weight: 700; border-radius: 8px; padding: 3px 9px; display: inline-block; }
    .btn-renew { background: #C87941; color: #fff; border: none; border-radius: 10px; padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; flex-shrink: 0; }
    .btn-renew:active { opacity: .85; }

    /* ── Subscription Modals ── */
    .sub-field-row { display: flex; gap: 10px; }
    .sub-field-row > div { flex: 1; }
