:root{--color-bg:#f6f7f9;--color-surface:#fff;--color-text:#1d2433;--color-muted:#5b6475;--color-border:#d8dce3;--color-primary:#1f6feb;--color-primary-hover:#1a5fcc;--color-error:#b42318;--color-error-bg:#fef3f2;--radius:8px;color:var(--color-text);background:var(--color-bg);-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.5}*,:before,:after{box-sizing:border-box}body{min-height:100vh;margin:0}h1,h2{line-height:1.2}a{color:var(--color-primary)}input,button{font:inherit}input{border:1px solid var(--color-border);border-radius:var(--radius);background:var(--color-surface);width:100%;min-height:44px;color:inherit;padding:.5rem .75rem}input:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}button{border:1px solid var(--color-border);border-radius:var(--radius);background:var(--color-surface);min-height:44px;color:inherit;cursor:pointer;padding:.5rem 1rem}button:disabled{opacity:.6;cursor:default}button.primary{border-color:var(--color-primary);background:var(--color-primary);color:#fff}button.primary:hover:not(:disabled){background:var(--color-primary-hover)}button.link-button{color:var(--color-primary);background:0 0;border:none;padding:.5rem;text-decoration:underline}.card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius);padding:1.25rem}.app-header{background:var(--color-surface);border-bottom:1px solid var(--color-border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem 1rem;padding:.5rem 1rem;display:flex}.app-name{color:var(--color-text);font-size:1.25rem;font-weight:700;text-decoration:none}.app-nav{flex-wrap:wrap;align-items:center;gap:.25rem .75rem;display:flex}.app-nav a{align-items:center;min-height:44px;padding:0 .25rem;display:inline-flex}.user-email{color:var(--color-muted);overflow-wrap:anywhere}.page{max-width:1100px;margin:0 auto;padding:1rem}.placeholder{color:var(--color-muted)}.auth-page{justify-content:center;padding:2rem 1rem;display:flex}.auth-card{flex-direction:column;gap:1rem;width:100%;max-width:380px;display:flex}.auth-card h2{margin:0;font-size:1.25rem}.auth-app-name{color:var(--color-primary);margin:0;font-size:1.5rem}.field{flex-direction:column;gap:.25rem;display:flex}.hint{color:var(--color-muted)}.form-error{border-radius:var(--radius);background:var(--color-error-bg);color:var(--color-error);margin:0;padding:.75rem}.auth-switch{color:var(--color-muted);margin:0}.input-block{flex-direction:column;gap:1rem;display:flex}.weight-form{flex-direction:column;gap:.75rem;display:flex}.weight-form-fields{align-items:flex-end;gap:.75rem;display:flex}.weight-form-fields .field{flex:12rem}.duplicate{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;display:flex}.weights-empty{color:var(--color-muted);margin:0}.weights-scroll{--row-height:3rem;height:calc(var(--row-height) * 11);border:1px solid var(--color-border);border-radius:var(--radius);overflow:auto}.weights-table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.weights-table th,.weights-table td{height:var(--row-height);border-bottom:1px solid var(--color-border);text-align:left;white-space:nowrap;padding:0 .75rem}.weights-table thead th{z-index:1;background:var(--color-bg);font-weight:600;position:sticky;top:0}.weights-table .num{text-align:right}.weights-table .trend{color:var(--color-muted)}.weights-table .actions{text-align:right;width:1%}.row-actions{justify-content:flex-end;align-items:center;gap:.25rem;display:flex}.row-actions button{min-height:2.5rem;padding:.25rem .75rem}.icon-button{justify-content:center;align-items:center;width:2.75rem;display:inline-flex}.row-actions .icon-button{border-color:#0000;padding:0}.icon-button:hover:not(:disabled){border-color:var(--color-border)}.icon-button svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:1.25rem;height:1.25rem}.edit-input{text-align:right;max-width:8rem;min-height:2.5rem}.edit-error{color:var(--color-error);white-space:normal;display:block}@media (width<=899px){.weight-form-fields{flex-direction:column;align-items:stretch}.weight-form-fields .field{flex:none}.weights-table th,.weights-table td{padding:0 .5rem}}.mode-toggle{justify-content:flex-end;display:flex}.text-editor{flex-direction:column;gap:.75rem;display:flex}.text-editor-area{border:1px solid var(--color-border);border-radius:var(--radius);background:var(--color-surface);width:100%;height:33rem;color:inherit;resize:vertical;padding:.5rem .75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:1rem;line-height:1.5;overflow:auto}.text-editor-area:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.text-editor-hint{color:var(--color-muted);margin:0;font-size:.875rem}.text-editor-errors-title{margin:0 0 .25rem}.text-editor .form-error ul{margin:0;padding-left:1.25rem}.text-editor-actions{gap:.75rem;display:flex}.chart-block{flex-direction:column;gap:1rem;margin-top:1rem;display:flex}.chart-controls{flex-wrap:wrap;align-items:flex-end;gap:.75rem 1.25rem;display:flex}.range-buttons{display:flex}.range-buttons button{border-radius:0}.range-buttons button:first-child{border-radius:var(--radius) 0 0 var(--radius)}.range-buttons button:last-child{border-radius:0 var(--radius) var(--radius) 0}.range-buttons button+button{border-left-width:0}.range-buttons button.active{border-color:var(--color-primary);background:var(--color-primary);color:#fff}.range-buttons button.active+button{border-left-width:0}.control-select{color:var(--color-muted);flex-direction:column;gap:.25rem;font-size:.875rem;display:flex}select{border:1px solid var(--color-border);border-radius:var(--radius);background:var(--color-surface);min-height:44px;color:var(--color-text);font:inherit;padding:.5rem .75rem}select:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.control-toggles{flex-wrap:wrap;gap:0 1rem;display:flex}.control-toggle{cursor:pointer;align-items:center;gap:.5rem;min-height:44px;display:inline-flex}.control-toggle input{width:1.25rem;height:1.25rem;min-height:auto;margin:0}.chart-controls .form-error{flex-basis:100%}.weight-chart{width:100%;height:420px;min-height:300px}.chart-hint{color:var(--color-muted);margin:0}.stats-list{grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem 1.25rem;margin:0;display:grid}.stat dt{color:var(--color-muted);font-size:.875rem}.stat dd{font-variant-numeric:tabular-nums;margin:.125rem 0 0;font-size:1.25rem;font-weight:600}.stats-goal{margin:.75rem 0 0}.monthly-scroll{--row-height:3rem;border:1px solid var(--color-border);border-radius:var(--radius);overflow-x:auto}@media (width<=899px){.weight-chart{height:320px}}
