@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');
:root{--bg:#fff0ed;--surface:#fffaf8;--soft:#f8e5e1;--ink:#654d49;--muted:#9a817c;--accent:#b98078;--accent2:#9f6861;--line:#e7cbc6;--shadow:0 16px 48px #70453e12;--scale:1}
*{box-sizing:border-box}body{margin:0;background:#f3f0ef;color:var(--ink);font:15px "DM Sans","Noto Sans SC",sans-serif;transition:background .35s,color .35s}.app{margin:14px;min-height:calc(100vh - 28px);background:var(--bg);border-radius:30px;padding:24px 30px 12px;box-shadow:var(--shadow);transition:background .35s}
body.dark{--bg:#252323;--surface:#302c2b;--soft:#3b3332;--ink:#f3e5e1;--muted:#bda6a0;--accent:#d29b92;--accent2:#e5b3aa;--line:#574441;--shadow:0 16px 48px #0003}
body{font-size:calc(15px * var(--scale))}.topbar{height:58px;display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--line);padding-bottom:18px}.back{border:0;background:none;color:var(--accent);width:34px;height:38px;padding:0;display:grid;place-items:center;cursor:pointer;transition:transform .25s}.back svg{display:block;width:30px;height:24px;overflow:visible}.back path{fill:none;stroke:currentColor;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.back:hover{transform:translateX(-3px)}.brand{height:50px;min-width:170px;border-radius:30px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;gap:10px;font-size:calc(19px * var(--scale, 1))}.brand span{font-size:calc(21px * var(--scale, 1))}.top-right{margin-left:auto;color:var(--muted);font-size:calc(11px * var(--scale, 1));display:flex;align-items:center;gap:8px}.saved-dot{width:7px;height:7px;border-radius:50%;background:#7ca58a}
.layout{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:calc(100vh - 150px)}.sidebar{border-right:1px solid var(--line);padding:27px 18px 16px 0;display:flex;flex-direction:column}.side-label{font-size:calc(10px * var(--scale, 1));letter-spacing:.17em;color:var(--muted);font-weight:700;margin:0 0 14px 14px}nav{display:flex;flex-direction:column;gap:7px}.nav-item{border:1px solid transparent;border-radius:30px;background:transparent;color:var(--muted);display:flex;align-items:center;gap:11px;padding:10px 13px;min-height:44px;text-align:left;cursor:pointer;transition:background .3s,color .25s,transform .3s,border-color .25s}.nav-item:hover{background:var(--soft);color:var(--ink);transform:translateX(3px)}.nav-item.active{background:var(--surface);border-color:var(--accent);color:var(--ink);transform:translateX(4px);box-shadow:0 5px 16px #70453e0c}.nav-item i{font-style:normal;width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:var(--soft);color:var(--accent2);font-size:calc(12px * var(--scale, 1));font-weight:700}.nav-item > span:last-child{margin-left:auto;font-size:calc(20px * var(--scale, 1));opacity:0;transition:.2s}.nav-item > span:not(:last-child){font-size:inherit;opacity:1;margin-left:0;transition:none}.nav-item.active > span:last-child,.nav-item:hover > span:last-child{opacity:.65}.side-note{margin-top:auto;color:var(--muted);font-size:calc(11px * var(--scale, 1));padding:18px 10px 4px}
.logout-button {
  margin: 12px 0 0;
  padding: 11px 13px;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 30px;
  background: transparent;
  color: #b85d56;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s;
}

.logout-button:hover {
  background: #f8e5e1;
  color: #a94442;
  transform: translateX(3px);
}

.logout-button:active {
  transform: scale(.98);
}

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.account-actions .logout-button,
.delete-account-button {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 30px;
  background: transparent;
  color: #b85d56;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s;
}

.account-actions .logout-button:hover,
.delete-account-button:hover {
  background: #f8e5e1;
  color: #a94442;
  transform: translateX(3px);
}

.account-actions button:active {
  transform: scale(.98);
}
.main{padding:34px clamp(22px,5vw,70px) 42px;overflow:hidden}.panel{max-width:800px;margin:auto;animation:appear .42s cubic-bezier(.2,.75,.25,1)}@keyframes appear{from{opacity:0;transform:translateY(12px);filter:blur(2px)}to{opacity:1;transform:none;filter:blur(0)}}.eyebrow{font-size:calc(10px * var(--scale, 1));letter-spacing:.17em;color:var(--accent2);font-weight:700;margin-bottom:10px}h1{font-size:calc(clamp(27px,3vw,37px) * var(--scale, 1));font-weight:500;letter-spacing:-.05em;margin:0 0 9px}.lead{color:var(--muted);font-size:calc(13px * var(--scale, 1));line-height:1.75;margin:0 0 27px;max-width:630px}.card{background:var(--surface);border:1px solid var(--line);border-radius:21px;padding:21px 23px;margin-bottom:14px;transition:background .3s}.card h2{font-size:calc(14px * var(--scale, 1));margin:0 0 5px}.card .desc{font-size:calc(11px * var(--scale, 1));color:var(--muted);margin:0 0 12px;line-height:1.6}.row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 0;border-bottom:1px solid var(--line)}.row:first-of-type{padding-top:3px}.row:last-child{border:0;padding-bottom:2px}.copy{flex:1}.label{font-size:calc(12px * var(--scale, 1));font-weight:600;margin-bottom:5px}.help{font-size:calc(11px * var(--scale, 1));color:var(--muted);line-height:1.55}.control{flex:0 0 auto;display:flex;align-items:center;gap:8px}
select,input[type=time]{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:11px;padding:9px 11px;max-width:210px;outline:none}select:focus,input:focus{border-color:var(--accent)}.switch{position:relative;width:44px;height:25px;display:inline-block}.switch input{opacity:0;width:0;height:0}.track{position:absolute;inset:0;background:#d8c9c5;border-radius:20px;cursor:pointer;transition:.25s}.track:before{content:"";position:absolute;width:19px;height:19px;left:3px;top:3px;border-radius:50%;background:white;transition:.25s}.switch input:checked+.track{background:var(--accent)}.switch input:checked+.track:before{transform:translateX(19px)}
.segment{display:flex;gap:4px;padding:4px;background:var(--soft);border-radius:12px;flex-wrap:wrap}.segment button,.btn{border:0;border-radius:9px;padding:8px 11px;background:transparent;color:var(--muted);font-size:calc(11px * var(--scale, 1));cursor:pointer;transition:.2s}.segment button.selected{background:var(--surface);color:var(--ink);box-shadow:0 2px 7px #0001}.btn{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:10px 14px}.btn:hover{background:var(--soft);border-color:var(--accent)}.btn.primary{background:var(--accent);border-color:var(--accent);color:white}.btn.danger{color:#b85d56}.swatches{display:flex;gap:10px}.swatch{width:28px;height:28px;border-radius:50%;border:2px solid var(--surface);outline:1px solid var(--line);cursor:pointer}.swatch.selected{outline:2px solid var(--accent2)}input[type=range]{width:125px;accent-color:var(--accent)}.preview{background:var(--bg);border:1px dashed var(--line);border-radius:17px;padding:20px}.bubble{display:inline-block;background:var(--surface);border:1px solid var(--line);border-radius:16px 16px 16px 4px;padding:13px 15px;font-size:calc(13px * var(--scale, 1));line-height:1.6}.notice{background:var(--soft);border-radius:14px;padding:15px 17px;color:var(--muted);font-size:calc(11px * var(--scale, 1));line-height:1.7}footer{text-align:center;color:var(--muted);font-size:calc(9px * var(--scale, 1));letter-spacing:.13em;padding:14px}footer span{padding:0 7px}#toast{position:fixed;top:24px;bottom:auto;left:50%;transform:translate(-50%,-12px);z-index:99999;background:var(--ink);color:var(--bg);padding:11px 17px;border-radius:12px;font-size:calc(12px * var(--scale, 1));opacity:0;transition:.25s;pointer-events:none}#toast.show{opacity:1;transform:translate(-50%,0)}
body.reduce-motion *,body.reduce-motion *:before,body.reduce-motion *:after{animation-duration:.01ms!important;transition-duration:.01ms!important}
@media(max-width:850px){.app{margin:0;border-radius:0;padding:14px}.layout{grid-template-columns:1fr}.sidebar{border:0;border-bottom:1px solid var(--line);padding:15px 0}nav{flex-direction:row;overflow:auto;padding:3px 2px 10px}.nav-item{flex:0 0 auto;width:auto}.nav-item > span:last-child{display:none}.side-label,.side-note{display:none}.main{padding:25px 2px 35px}}
@media(max-width:520px){.app{padding:10px}.brand{min-width:130px;font-size:calc(17px * var(--scale, 1))}.top-right{font-size:0}.card{padding:17px}.row{gap:10px;align-items:flex-start}.control{max-width:55%}.segment button{padding:8px}}

/* Additional gentle motion only; existing layout and controls remain unchanged. */
.card { transition: background .3s ease, border-color .28s ease, box-shadow .28s ease, transform .28s ease; }
.card:hover { box-shadow: 0 10px 28px #70453e0b; }
.nav-item, .btn, .segment button, .swatch, .back, .track, .track:before, select, input[type=time] {
  transition-timing-function: cubic-bezier(.22,.72,.24,1);
}
.btn:active, .segment button:active, .nav-item:active, .swatch:active { transform: scale(.98); }
select, input[type=time] { transition: border-color .22s ease, box-shadow .22s ease, background .3s ease, color .3s ease; }
select:focus, input[type=time]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Profile page */
.profile-identity{display:flex;align-items:center;gap:18px;padding:12px 2px 17px}
.profile-avatar{width:76px;height:76px;flex:0 0 76px;display:grid;place-items:center;border-radius:50%;background-color:var(--soft);background-size:cover;background-position:center;color:var(--accent2);font-size:27px;font-weight:600;border:1px solid var(--line)}
.profile-avatar.has-image{color:transparent}
.profile-details{min-width:0}
.profile-display-name{font-size:calc(17px * var(--scale, 1));font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.profile-email{margin-top:6px;color:var(--muted);font-size:calc(12px * var(--scale, 1));overflow-wrap:anywhere}
.profile-actions{display:flex;flex-wrap:wrap;gap:10px;padding-top:5px}
.profile-actions .btn{min-width:120px}
.profile-actions .btn.danger{border-color:#e4c5c0}
@media(max-width:520px){.profile-identity{gap:13px}.profile-avatar{width:64px;height:64px;flex-basis:64px}.profile-actions{flex-direction:column}.profile-actions .btn{width:100%}}


/* Compact, flat profile editor */
.profile-identity{display:flex;align-items:center;gap:14px;padding:8px 0 12px}
.profile-avatar-wrap{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.profile-avatar{width:64px;height:64px;flex:0 0 64px;font-size:23px;border:0}
.profile-details{min-width:0;flex:1}
.profile-display-name{font-size:15px;font-weight:600}
.profile-email{font-size:11px;margin-top:4px}
.profile-edit-toggle,.profile-change-avatar{border:0;background:transparent;color:var(--accent2);font:inherit;font-size:12px;padding:6px 4px;cursor:pointer;white-space:nowrap}
.profile-edit-toggle{margin-left:auto;align-self:flex-start}
.profile-change-avatar{display:none}
.profile-name-input{display:none;width:100%;max-width:260px;margin-top:7px;padding:7px 9px;border:1px solid var(--line);border-radius:6px;background:transparent;color:var(--ink);font:inherit;font-size:13px;outline:none}
.profile-name-input:focus{border-color:var(--accent)}
.profile-edit-actions{display:none;align-items:center;gap:8px;margin:5px 0 8px 78px}
.profile-editor.is-editing .profile-change-avatar{display:inline-block}
.profile-editor.is-editing .profile-name-input{display:block}
.profile-editor.is-editing .profile-display-name{display:none}
.profile-editor.is-editing .profile-edit-actions{display:flex}
.profile-edit-actions .btn{min-width:0;padding:6px 12px;font-size:12px;box-shadow:none}
.profile-edit-hint{font-size:11px;color:var(--muted)}
.profile-edit-status{display:none}
.profile-actions{gap:8px;padding-top:3px}
.profile-actions .btn{min-width:0;padding:7px 12px;font-size:12px;box-shadow:none}
@media(max-width:520px){
  .profile-identity{gap:9px}
  .profile-avatar{width:56px;height:56px;flex-basis:56px}
  .profile-avatar-wrap{gap:4px}
  .profile-edit-actions{margin-left:0;flex-wrap:wrap}
}
