:root{
  --bg:#f7f3ef; --paper:#fffdfb; --ink:#272525; --muted:#7e7a76;
  --line:#e9e1da; --sand:#eee4dd; --stone:#cbc6bf; --sage:#73816f; --sage-dark:#52614f;
  --shadow:0 12px 36px rgba(39,37,37,.08); --radius:22px; --nav-h:78px;
}
*{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}.app-shell{min-height:100vh;max-width:860px;margin:auto;background:linear-gradient(180deg,#fbf8f5 0%,#f7f3ef 100%);position:relative}.topbar{height:76px;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:20;background:rgba(247,243,239,.88);backdrop-filter:blur(14px);border-bottom:1px solid rgba(233,225,218,.7)}
.brand{border:0;background:none;display:flex;align-items:center;gap:9px;padding:0}.brand img{width:38px;height:38px;border-radius:50%;object-fit:cover}.brand span,.user-chip span{display:flex;flex-direction:column;align-items:flex-start}.brand strong{font-family:Georgia,serif;font-size:19px;font-weight:500}.brand small,.user-chip small{font-size:9px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}.user-chip{display:flex;align-items:center;gap:8px}.user-avatar{width:34px;height:34px;border-radius:50%;background:var(--ink);color:#fff;display:grid!important;place-items:center;font-size:11px;letter-spacing:.05em}.user-chip strong{font-size:13px}
.main{padding:20px 16px calc(var(--nav-h) + 30px)}.view{display:none;animation:fade .22s ease}.view.active{display:block}@keyframes fade{from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:none}}
h1,h2,h3,p{margin-top:0}h1,h2{font-family:Georgia,"Times New Roman",serif;font-weight:500}.hero{min-height:180px;background:linear-gradient(135deg,#e9e2da,#f8f1eb);border:1px solid var(--line);border-radius:28px;padding:28px 24px;display:flex;justify-content:space-between;gap:20px;overflow:hidden;position:relative;box-shadow:var(--shadow)}.hero:after{content:"";position:absolute;width:180px;height:180px;border-radius:50%;background:rgba(115,129,111,.13);right:-70px;bottom:-70px}.hero h1{font-size:38px;margin-bottom:8px}.hero p{color:var(--muted);max-width:320px}.hero-mark{font-family:Georgia,serif;font-size:96px;line-height:.8;color:rgba(39,37,37,.08);align-self:flex-end;z-index:1}.eyebrow{text-transform:uppercase;letter-spacing:.18em;font-size:10px;font-weight:700;color:var(--sage-dark);margin-bottom:8px}
.card{background:rgba(255,253,251,.92);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 24px rgba(39,37,37,.045)}.accent-card{margin-top:14px;padding:20px;background:linear-gradient(135deg,#6e7d6b,#53604f);color:#fff;border:0}.card-head{display:flex;align-items:center;gap:12px}.card-head h2{margin:2px 0 0;font-size:24px}.card-head small,.accent-card p{color:rgba(255,255,255,.78)}.accent-card p{margin:16px 0 10px;line-height:1.55}.icon-badge{width:42px;height:42px;border-radius:14px;background:var(--sand);display:grid;place-items:center;font-size:18px;color:var(--ink);flex:0 0 auto}.accent-card .icon-badge{background:rgba(255,255,255,.15);color:#fff}.text-btn{border:0;background:none;color:inherit;font-weight:700;padding:6px 0}.text-btn span{margin-left:5px}.section-title{display:flex;align-items:end;justify-content:space-between;margin:26px 2px 12px}.section-title h2{font-size:25px;margin:0}.section-title>span,.section-title>button{font-size:12px;color:var(--muted);border:0;background:none}.section-title.compact{margin:0 0 14px}.section-title.compact h2{font-size:21px}
.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.dashboard-card{padding:17px;min-height:172px;display:flex;flex-direction:column;align-items:flex-start}.dashboard-card small{color:var(--muted);margin:12px 0 4px}.dashboard-card h3{font-size:18px;margin:0 0 8px}.dashboard-card p{font-size:13px;line-height:1.4;color:var(--muted);margin-bottom:12px}.card-link{margin-top:auto;font-size:12px;font-weight:700;color:var(--sage-dark)}.water-card{grid-column:1/-1;min-height:auto}.water-top{width:100%;display:flex;align-items:center;justify-content:space-between}.water-top small{margin:0}.water-ring{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--sage) 0deg,#e8e3de 0deg);position:relative}.water-ring:after{content:"";position:absolute;inset:6px;border-radius:50%;background:var(--paper)}.water-ring span{position:relative;z-index:1;font-size:11px;font-weight:700}.water-actions{display:flex;gap:8px;flex-wrap:wrap;width:100%;margin-top:14px}.water-actions button,.chip-row button{border:1px solid var(--line);background:var(--paper);border-radius:999px;padding:9px 12px;font-size:12px;font-weight:700}.water-actions .ghost{color:var(--muted)}.quick-plan{margin-top:14px;padding:18px}.quick-list>div{display:flex;gap:12px;padding:10px 0;border-top:1px solid var(--line)}.quick-list>div:first-child{border-top:0}.quick-list span{font:600 11px/1 system-ui;color:var(--sage-dark);width:24px}.quick-list p{font-size:13px;margin:0;line-height:1.5}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:2px 2px 18px}.page-head h1{font-size:36px;margin:0 0 5px}.page-head p:not(.eyebrow){color:var(--muted);margin:0;font-size:14px}.icon-btn,.primary-btn{border:0;text-decoration:none;background:var(--ink);color:#fff;border-radius:14px;padding:12px 16px;font-weight:700;font-size:13px}.icon-btn{display:grid;place-items:center;min-width:46px}.primary-btn.small{padding:10px 13px}.chip-row{display:flex;gap:8px;overflow:auto;padding:2px 0 12px;scrollbar-width:none}.chip-row::-webkit-scrollbar{display:none}.chip-row button.active{background:var(--sage-dark);color:white;border-color:var(--sage-dark)}.meal-card{padding:18px;margin-bottom:12px}.meal-card h2{font-size:23px;margin-bottom:5px}.meal-card>p{color:var(--muted);font-size:13px}.option{padding:14px 0;border-top:1px solid var(--line)}.option:first-of-type{border-top:0}.option h3{font-size:14px;margin:0 0 8px}.option ul{margin:0;padding-left:18px}.option li{font-size:13px;line-height:1.55;margin:4px 0}.note{font-size:12px;background:var(--sand);padding:10px 12px;border-radius:12px;color:#5f5a56}.reference-card{padding:18px;margin-top:12px}.clean-list{margin:0;padding-left:19px}.clean-list li{font-size:13px;line-height:1.55;margin:7px 0}.details-card{margin-top:12px;padding:0;overflow:hidden}.details-card summary{padding:17px 18px;font-weight:700;list-style:none;cursor:pointer}.details-card summary::-webkit-details-marker{display:none}.details-card[open] summary{border-bottom:1px solid var(--line)}.details-card>div,.details-card>ul{padding:15px 18px 18px}.table-scroll{overflow:auto}.table-scroll table{width:100%;min-width:560px;border-collapse:collapse;font-size:12px}.table-scroll th,.table-scroll td{padding:10px;border-bottom:1px solid var(--line);text-align:left}.table-scroll th{background:#f4efeb}.reference-block p{font-size:13px;line-height:1.55}
.empty-state{text-align:center;padding:34px 24px}.empty-icon{width:72px;height:72px;border-radius:24px;background:var(--sand);display:grid;place-items:center;margin:0 auto 18px;font-size:32px}.empty-state h2{font-size:25px}.empty-state p{color:var(--muted);line-height:1.6}.future-card{margin-top:12px;padding:18px}.future-card>small{color:var(--muted)}.future-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.future-grid div{background:#f7f2ee;border-radius:15px;padding:13px}.future-grid strong,.future-grid span{display:block}.future-grid strong{font-size:13px}.future-grid span{font-size:11px;color:var(--muted);margin-top:5px}
.metric-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.metric-card{padding:18px}.metric-card small{color:var(--muted)}.metric-card h2{font-family:inherit;font-size:29px;font-weight:700;margin:8px 0 4px}.metric-card p{font-size:12px;color:var(--muted);margin:0}.chart-card,.log-card{margin-top:12px;padding:18px}.chart-empty{height:190px;display:grid;place-items:center;color:var(--muted);font-size:13px;background:#faf7f4;border-radius:14px}.chart-svg{width:100%;height:190px;display:block}.log-item{padding:12px 0;border-top:1px solid var(--line)}.log-item:first-child{border-top:0}.log-item-head{display:flex;justify-content:space-between;gap:8px}.log-item strong{font-size:13px}.log-item small{color:var(--muted)}.log-item p{font-size:12px;color:var(--muted);margin:5px 0 0;line-height:1.45}.empty-copy{font-size:13px;color:var(--muted)}
.upload-card{padding:22px;text-align:center}.upload-icon{width:56px;height:56px;border-radius:18px;background:var(--sand);display:grid;place-items:center;margin:0 auto 14px;font-size:24px}.upload-card h2{margin-bottom:8px}.upload-card p{font-size:13px;color:var(--muted);line-height:1.5}.upload-card label{display:block;text-align:left;font-size:11px;font-weight:700;margin:16px 0 6px;text-transform:uppercase;letter-spacing:.08em}.upload-card select,.modal input,.modal select,.modal textarea{width:100%;border:1px solid var(--line);background:#fff;border-radius:13px;padding:12px;outline:none}.upload-card .primary-btn{width:100%;margin-top:10px}.document-list{display:grid;gap:10px}.doc-row{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);background:var(--paper);border-radius:17px}.doc-icon{width:42px;height:42px;border-radius:13px;background:var(--sand);display:grid;place-items:center;font-size:11px;font-weight:800}.doc-info{min-width:0;flex:1}.doc-info strong,.doc-info small{display:block}.doc-info strong{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.doc-info small{font-size:11px;color:var(--muted);margin-top:4px}.doc-actions{display:flex;gap:5px}.doc-actions button,.doc-actions a{border:0;background:#f5f0ec;border-radius:10px;padding:8px;font-size:11px;text-decoration:none;color:var(--ink)}
.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,860px);height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding:9px 10px calc(9px + env(safe-area-inset-bottom));background:rgba(255,253,251,.92);backdrop-filter:blur(18px);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);z-index:30}.bottom-nav button{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:4px;color:#8a8580}.bottom-nav span{font-size:19px;line-height:1}.bottom-nav small{font-size:9px}.bottom-nav button.active{color:var(--sage-dark);font-weight:800}
.modal{border:0;padding:0;border-radius:24px;width:min(calc(100% - 28px),480px);background:var(--paper);box-shadow:0 24px 80px rgba(39,37,37,.28)}.modal::backdrop{background:rgba(39,37,37,.42);backdrop-filter:blur(3px)}.modal form{padding:22px}.modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}.modal-head small{color:var(--muted);text-transform:uppercase;letter-spacing:.12em;font-size:10px}.modal-head h2{margin:4px 0 0}.close-btn{width:34px;height:34px;border-radius:50%;border:0;background:#f1ece8;font-size:20px}.modal label{display:block;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin:14px 0 6px}.modal .primary-btn{width:100%;margin-top:16px}.mood-row{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.mood-row button{height:44px;border-radius:13px;border:1px solid var(--line);background:#fff;font-size:18px}.mood-row button.active{background:var(--sage-dark);color:#fff;border-color:var(--sage-dark)}.toast{position:fixed;left:50%;bottom:calc(var(--nav-h) + 18px);transform:translate(-50%,18px);opacity:0;background:var(--ink);color:#fff;padding:10px 14px;border-radius:999px;font-size:12px;z-index:60;pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:680px){.main{padding-left:28px;padding-right:28px}.hero{min-height:210px;padding:34px}.dashboard-grid{grid-template-columns:repeat(4,1fr)}.water-card{grid-column:span 2}.metric-grid{grid-template-columns:1fr 1fr}.future-grid{grid-template-columns:repeat(4,1fr)}}

/* v0.2 · Check-in intestinal / Escala de Bristol */
.modal{max-height:92dvh;overflow:hidden}.modal form{max-height:92dvh;overflow-y:auto;-webkit-overflow-scrolling:touch}.field-help{font-size:12px;line-height:1.45;color:var(--muted);margin:-1px 0 10px}.bristol-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.bristol-card{min-height:92px;border:1px solid var(--line);background:#fff;border-radius:15px;padding:9px;display:grid;grid-template-columns:28px 48px 1fr;align-items:center;gap:7px;text-align:left}.bristol-card:last-child{grid-column:1/-1}.bristol-card.active{border-color:var(--sage-dark);background:#f2f5f0;box-shadow:inset 0 0 0 1px var(--sage-dark)}.bristol-number{width:25px;height:25px;border-radius:50%;background:var(--sand);display:grid;place-items:center;font-size:11px;font-weight:800}.bristol-card.active .bristol-number{background:var(--sage-dark);color:#fff}.bristol-card small{font-size:10px;line-height:1.25;color:var(--muted);text-transform:none;letter-spacing:0;font-weight:600}.bristol-shape{height:34px;display:flex;align-items:center;justify-content:center;gap:2px;position:relative}.bristol-shape i{display:block;background:#9a806c}.type-1 i{width:7px;height:7px;border-radius:50%}.type-1 i:nth-child(2),.type-1 i:nth-child(5){transform:translateY(6px)}.type-2 i{width:12px;height:16px;border-radius:50%}.type-2 i:nth-child(2){transform:translateY(-3px)}.type-2 i:nth-child(3){transform:translateY(3px)}.type-3 i,.type-4 i{width:44px;height:15px;border-radius:12px}.type-3 i{background:repeating-linear-gradient(90deg,#9a806c 0 8px,#806956 8px 10px)}.type-4 i{background:#9a806c}.type-5 i{width:13px;height:13px;border-radius:48%}.type-5 i:nth-child(2){width:16px;height:16px}.type-6 i{width:16px;height:14px;border-radius:52% 44% 58% 42%;filter:blur(.25px)}.type-6 i:nth-child(2){transform:translateY(4px)}.type-7 i{width:45px;height:14px;border-radius:50%;background:#aa9380;opacity:.8;filter:blur(.5px)}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.symptom-chip-grid{display:flex;flex-wrap:wrap;gap:7px}.modal .symptom-chip-grid label{margin:0;text-transform:none;letter-spacing:0;font-weight:600}.symptom-chip-grid input{position:absolute;opacity:0;pointer-events:none}.symptom-chip-grid span{display:block;border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 11px;font-size:11px}.symptom-chip-grid input:checked+span{background:var(--sage-dark);border-color:var(--sage-dark);color:#fff}.medical-note{font-size:10px;line-height:1.45;color:var(--muted);background:#f7f2ee;border-radius:11px;padding:9px 10px;margin:14px 0 0}.bristol-summary-card{margin-top:12px;padding:18px}.bristol-summary p{font-size:11px;color:var(--muted);margin:12px 0 0}.bristol-bars{height:120px;display:grid;grid-template-columns:repeat(7,1fr);gap:7px;align-items:end}.bristol-bar-item{height:100%;display:grid;grid-template-rows:1fr auto auto;gap:3px;text-align:center;min-width:0}.bristol-bar-track{height:82px;border-radius:8px;background:#f3eeea;position:relative;overflow:hidden;display:flex;align-items:flex-end}.bristol-bar-track span{width:100%;min-height:4px;background:var(--sage);border-radius:8px 8px 3px 3px}.bristol-bar-item b{font-size:11px}.bristol-bar-item small{font-size:9px;color:var(--muted)}
@media(max-width:390px){.bristol-card{grid-template-columns:25px 42px 1fr;padding:8px;gap:5px}.bristol-card small{font-size:9px}.field-row{grid-template-columns:1fr}}
