/* Cascade contract: base declarations in rs-normal; reviewed overrides in rs-priority. See source/MAINTENANCE.md. */
@layer rs-normal, rs-inline, rs-priority;
@layer rs-normal {
  :root {
    --bg: #0b1220;
    --card: #111a2e;
    --border: rgba(255,255,255,.12);
    --text: #e5e7eb;
    --muted: #cbd5e1;
    --accent: #60a5fa;
    --accent2: #a78bfa;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
  }
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    font-family: system-ui,-apple-system,Segoe UI,Roboto,"Noto Sans JP",sans-serif;
    background: radial-gradient(1200px 600px at 20% 10%, rgba(96,165,250,.22), transparent 60%), radial-gradient(900px 500px at 90% 20%, rgba(167,139,250,.18), transparent 60%), var(--bg);
    color: var(--text);
  }
  header {
    padding: 18px 16px calc(10px + env(safe-area-inset-top));
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    background: linear-gradient(180deg, rgba(11,18,32,.92), rgba(11,18,32,.65));
    border-bottom: 1px solid var(--border);
    z-index: 10;
  }
  .wrap {
    max-width: 720px;
    margin: 0 auto;
  }
  .title {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .badge {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: var(--shadow);
  }
  h1 {
    font-size: 18px;
    margin: 0;
    letter-spacing: .2px;
  }
  .sub {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
  }
  .backup-hero-art {
    margin-bottom: 10px;
    padding: 6px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
    border: 1px solid rgba(244,195,140,.34);
    box-shadow: 0 14px 28px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.10);
  }
  .backup-hero-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    background: rgba(4,8,14,.42);
    box-shadow: 0 8px 20px rgba(0,0,0,.28);
  }
  .title-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    margin-top: 6px;
    border: 1px solid #f4c38c;
    border-radius: 12px;
    background: linear-gradient(135deg,#34d399,#059669);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .04em;
    box-shadow: 0 8px 20px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.22);
    text-shadow: 0 1px 2px rgba(0,0,0,.55);
  }
  main {
    padding: 14px 16px 90px;
  }
  .card {
    background: rgba(17,26,46,.9);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
  }
  .card h2 {
    margin: 0 0 6px;
    font-size: 16px;
  }
  .card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
  }
  .btnrow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  .btn {
    flex: 1;
    min-width: 140px;
    border: none;
    border-radius: 16px;
    padding: 12px 14px;
    font-weight: 900;
    color: #0b1220;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
  }
  .btn:active {
    transform: translateY(1px);
  }
  .backup-nav-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 7px;
  }
  .backup-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
  }
  .btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
  }
  .btn-secondary {
    background: linear-gradient(135deg, #34d399, #60a5fa);
  }
  .btn-warn {
    background: linear-gradient(135deg, #fbbf24, #fb7185);
  }
  .btn-danger {
    background: linear-gradient(135deg, #fb7185, #f87171);
  }
  .mini {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
  }
  .footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(11,18,32,.75);
    backdrop-filter: blur(10px);
  }
  .footer .hint {
    max-width: 720px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
  }
  /* === App background image (v50.18) === */
  :root {
    --app-bg-url: url('./assets/app_bg.webp');
    --app-bg-overlay: rgba(11, 18, 32, 0.62);
  }
  html, body {
    background: var(--app-bg-url) center/cover fixed no-repeat;
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--app-bg-overlay);
    pointer-events: none;
    z-index: -1;
  }
  body {
    position: relative;
    z-index: 0;
  }
  /* v53.38 — remove legacy backup header band */
  .backup-secondary-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 9px;
    padding: 0 9px;
    border: 1px solid rgba(251,191,36,.35);
    border-radius: 999px;
    background: rgba(120,53,15,.20);
    color: #fde68a;
    font-size: 11px;
    font-weight: 900;
  }
}
