:root{
    --bg1:#f7f5ff;
    --bg2:#f3fbff;
    --ink:#1b1b24;
    --muted:#5d5d74;
    --card:#ffffffcc;
    --stroke:#ffffff70;
  
    --accent1:#ffd6e7;
    --accent2:#d7f5ff;
    --accent3:#dcf7df;
    --accent4:#fff3c8;
  
    --shadow: 0 18px 40px rgba(22, 22, 40, 0.12);
    --radius: 22px;
  }
  
  *{ box-sizing:border-box; }
  html,body{ height:100%; }
  body{
    margin:0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--ink);
    background:
      radial-gradient(1200px 700px at 10% 10%, var(--accent1), transparent 60%),
      radial-gradient(1000px 650px at 90% 20%, var(--accent2), transparent 60%),
      radial-gradient(900px 650px at 30% 90%, var(--accent3), transparent 60%),
      radial-gradient(900px 650px at 80% 85%, var(--accent4), transparent 60%),
      linear-gradient(180deg, var(--bg1), var(--bg2));
  }
  
  .app{
    min-height:100%;
    display:flex;
    flex-direction:column;
    gap:16px;
    padding:18px;
  }
  
  .topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
  }
  
  .brand{
    display:flex;
    align-items:center;
    gap:12px;
    min-width: 220px;
  }
  .logo{
    width:44px;
    height:44px;
    border-radius: 14px;
    display:grid;
    place-items:center;
    background: linear-gradient(135deg, #ffffff, #ffffffb0);
    border: 1px solid var(--stroke);
  }
  .brand-title{
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 16px;
  }
  .brand-subtitle{
    margin-top:2px;
    font-size: 12px;
    color: var(--muted);
  }
  
  .controls{
    display:flex;
    align-items:center;
    gap:10px;
  }
  
  .btn{
    border: 1px solid var(--stroke);
    background: #ffffffd9;
    padding: 10px 12px;
    border-radius: 14px;
    cursor:pointer;
    font-weight: 700;
    transition: transform .08s ease, box-shadow .08s ease;
    box-shadow: 0 10px 22px rgba(22, 22, 40, 0.08);
  }
  .btn:hover{ transform: translateY(-1px); }
  .btn:active{ transform: translateY(0px) scale(0.99); }
  .btn:focus-visible{ outline: 3px solid #00000018; outline-offset: 2px; }
  
  .toggle{
    display:flex;
    align-items:center;
    gap:10px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: #ffffffd9;
    box-shadow: 0 10px 22px rgba(22, 22, 40, 0.08);
    user-select:none;
  }
  .toggle input{
    position:absolute;
    opacity:0;
    pointer-events:none;
  }
  .toggle-ui{
    width: 44px;
    height: 26px;
    background: #00000010;
    border-radius: 999px;
    position: relative;
    display:inline-block;
    border: 1px solid #ffffffa0;
  }
  .toggle-ui::after{
    content:"";
    width: 22px;
    height: 22px;
    position:absolute;
    top:1px;
    left:1px;
    border-radius: 999px;
    background: white;
    box-shadow: 0 8px 16px rgba(22, 22, 40, 0.16);
    transition: transform .15s ease;
  }
  .toggle input:checked + .toggle-ui{
    background: linear-gradient(135deg, #a8f3c3, #a3e5ff);
  }
  .toggle input:checked + .toggle-ui::after{
    transform: translateX(18px);
  }
  .toggle-label{
    font-weight: 800;
    font-size: 13px;
  }
  
  .content{
    flex: 1;
    display:flex;
    flex-direction:column;
    gap: 16px;
  }
  
  .stage{
    flex: 1;
    display:flex;
  }
  .stage-card{
    width:100%;
    display:flex;
    gap: 16px;
    align-items:center;
    justify-content:space-between;
    padding: 18px 18px;
    border-radius: 28px;
    background: var(--card);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    min-height: 280px;
  }
  .stage-left{ min-width: 200px; }
  .big-letter{
    font-weight: 1000;
    font-size: clamp(96px, 14vw, 180px);
    line-height: 0.95;
    letter-spacing: 2px;
    text-shadow: 0 18px 40px rgba(22, 22, 40, 0.10);
  }
  .word{
    margin-top: 6px;
    font-weight: 900;
    font-size: clamp(26px, 4vw, 44px);
  }
  .hint{
    margin-top: 10px;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
  }
  
  .stage-right{
    display:grid;
    place-items:center;
    width: min(42%, 420px);
    min-width: 180px;
  }
  .picture{
    font-size: clamp(84px, 13vw, 160px);
    filter: drop-shadow(0 18px 30px rgba(22,22,40,0.14));
    transform: translateZ(0);
  }
  
  .keyboard-wrap{
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
  }
  
  .keyboard{
    display:flex;
    flex-direction:column;
    gap: 8px;
  }
  .row{
    display:flex;
    gap: 8px;
    flex-wrap:nowrap;
  }
  .key{
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: #ffffffd9;
    text-align:center;
    font-weight: 900;
    color: #2b2b38;
    box-shadow: 0 10px 18px rgba(22, 22, 40, 0.06);
    transition: transform .08s ease, box-shadow .08s ease, background .08s ease;
  }
  .key small{
    display:block;
    font-weight: 800;
    font-size: 10px;
    opacity: .6;
    margin-top: 3px;
  }
  .key.is-wide{ flex: 1.6; }
  .key.is-wider{ flex: 2.2; }
  .key.is-pressed{
    transform: translateY(-1px) scale(1.01);
    background: linear-gradient(135deg, #fff, #eafff3);
    box-shadow: 0 16px 26px rgba(22, 22, 40, 0.10);
  }
  
  kbd{
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid #ffffff90;
    background: #ffffffcc;
  }
  .small-note{
    margin-top: 10px;
    color: var(--muted);
    font-weight: 700;
    font-size: 12px;
  }
  
  .footer{
    padding: 10px 12px;
    text-align:center;
    color: var(--muted);
    font-weight: 700;
    font-size: 12px;
  }
  
  @media (max-width: 720px){
    .stage-card{
      flex-direction:column;
      align-items:stretch;
      text-align:center;
    }
    .stage-right{ width: 100%; }
    .row{ gap: 6px; }
    .key{ padding: 10px 8px; }
    .brand{ min-width: 0; }
  }
  
  
  