:root{
  --bg:#fbf7f3;
  --header:#f5ebe2;
  --surface:#fffefd;
  --surface-soft:#f8f0e9;
  --line:#e5d8cd;
  --line-strong:#9b6b4f;
  --text:#2c2521;
  --muted:#83766e;
  --brown:#734326;
  --brown-dark:#56301c;
  --brown-soft:#ead9cc;
  --pink:#cd3e76;
  --pink-soft:#fde5ef;
  --blue:#3d7f9e;
  --blue-soft:#e8f3f8;
  --orange:#d25d16;
  --orange-soft:#fff0e6;
  --green:#3e8754;
  --green-soft:#eaf5ed;
  --gold:#b88500;
  --gold-soft:#fff5ce;
  --danger:#b74545;
  --shadow:0 2px 8px rgba(68,43,30,.08);
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif;-webkit-text-size-adjust:100%}
body{overscroll-behavior-y:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
svg{display:block}
.hidden{display:none!important}
.app-shell{min-height:100dvh;background:var(--bg)}
.app-header{position:fixed;z-index:30;top:0;left:0;right:0;height:calc(54px + var(--safe-top));padding:var(--safe-top) 10px 0;display:grid;grid-template-columns:42px 1fr 42px;align-items:center;background:rgba(245,235,226,.97);border-bottom:1px solid rgba(105,65,39,.06);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.header-title-wrap{text-align:center;min-width:0}
.app-header h1{font-size:17px;line-height:1.15;margin:0;font-weight:700;letter-spacing:.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header-subtitle{font-size:9px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header-button{width:38px;height:38px;border:0;background:transparent;border-radius:10px;padding:9px;display:grid;place-items:center;color:#342a25}
.header-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.header-button:active{background:rgba(115,67,38,.08)}
#backBtn.hidden,#headerAction.hidden{display:grid!important;visibility:hidden}
.main{padding:calc(54px + var(--safe-top)) 0 calc(65px + var(--safe-bottom));min-height:100dvh}
.bottom-nav{position:fixed;z-index:35;left:0;right:0;bottom:0;height:calc(61px + var(--safe-bottom));padding:3px 2px var(--safe-bottom);display:grid;grid-template-columns:repeat(5,1fr);background:rgba(255,254,253,.98);border-top:1px solid #ece2db;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.nav-item{border:0;background:transparent;color:#918984;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:8px;padding:3px 0;min-width:0}
.nav-item svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.nav-item small{font-size:9px;line-height:1;white-space:nowrap}
.nav-item.active{color:var(--brown);font-weight:700}
.page{padding:0 10px 24px;max-width:700px;margin:0 auto}
.page.flush{padding-left:0;padding-right:0}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 4px 8px}
.page-heading h2{font-size:15px;margin:0;font-weight:700}
.page-heading p{font-size:10px;color:var(--muted);line-height:1.55;margin:4px 0 0}
.page-heading .heading-action{border:0;background:transparent;color:#3e332d;padding:6px}
.page-heading .heading-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.top-nav-tabs{display:grid;grid-template-columns:repeat(3,1fr);height:58px;margin:0 -10px 9px;background:#faf5f1;border-bottom:1px solid #eee3dc}
.top-nav-tab{position:relative;border:0;background:transparent;color:#978a82;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:9px;padding:5px 2px}
.top-nav-tab svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.top-nav-tab.active{color:var(--brown);font-weight:700}
.top-nav-tab.active:after{content:"";position:absolute;left:20%;right:20%;bottom:0;height:2px;background:var(--brown);border-radius:2px}
.segment-row{display:flex;gap:0;overflow:auto;scrollbar-width:none;border-bottom:1px solid #eadfd8;margin-bottom:10px}
.segment-row::-webkit-scrollbar,.chip-row::-webkit-scrollbar{display:none}
.segment{flex:1;min-width:max-content;border:0;background:transparent;padding:12px 8px 10px;color:#91837b;border-bottom:2px solid transparent;font-size:11px;font-weight:700}
.segment.active{color:var(--brown);border-bottom-color:var(--brown)}
.segment-row.pink .segment.active{color:var(--pink);border-bottom-color:var(--pink)}
.searchbox{display:flex;align-items:center;gap:8px;border:1px solid #d7c7bb;background:var(--surface);border-radius:8px;padding:0 10px;height:37px;margin:6px 0 8px;color:#8c7b70}
.searchbox svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.searchbox input{border:0;outline:0;background:transparent;flex:1;min-width:0;font-size:10.5px}
.searchbox input::placeholder{color:#9b918a}
.chip-row{display:flex;gap:6px;overflow:auto;padding:0 0 6px}
.chip-wrap{display:flex;gap:5px;flex-wrap:wrap;padding-bottom:7px}
.chip{border:1px solid #e0d2c8;background:#fffefd;border-radius:6px;padding:5px 9px;font-size:9px;line-height:1.2;white-space:nowrap;color:#6e625b}
.chip.active{background:var(--brown-soft);border-color:#c8a78f;color:#5c331d;font-weight:700}
.chip.pink.active{background:var(--pink-soft);border-color:#ef9dbc;color:#a42b60}
.section-title{font-size:12.5px;margin:18px 2px 9px;display:flex;align-items:center;gap:7px;font-weight:700}
.section-title:before{content:"";width:2px;height:15px;background:var(--brown);border-radius:2px;flex:0 0 auto}
.card{background:var(--surface);border:1px solid #eadfd7;border-radius:10px;box-shadow:var(--shadow);padding:12px;margin-bottom:8px}
.card.compact{padding:10px}
.card-header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.card-title{font-weight:700;font-size:13px;line-height:1.4}
.card-subtitle{font-size:10px;color:var(--muted);margin-top:3px;line-height:1.5}
.badge{display:inline-flex;align-items:center;gap:4px;padding:4px 7px;border-radius:999px;background:#f0e2d7;color:#6d3e22;font-size:9px;font-weight:700;white-space:nowrap}
.badge.pink{background:var(--pink-soft);color:#a32d61}.badge.blue{background:#e4f0f6;color:#326c89}.badge.green{background:#e6f3e8;color:#2f7444}.badge.gray{background:#eeeae7;color:#766b64}.badge.gold{background:#fff0c8;color:#946500}.badge.danger{background:#fde3e3;color:#a92f2f}
.meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}
.meta-cell{background:#f8f1ec;border-radius:7px;padding:7px;min-width:0}
.meta-cell label{display:block;font-size:8px;color:var(--muted);margin-bottom:2px}
.meta-cell strong{display:block;font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card-actions{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}
.icon-btn{width:32px;height:32px;border:0;background:transparent;border-radius:8px;padding:7px;display:grid;place-items:center;color:#65554c}.icon-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.icon-btn:active{background:#f2e7df}
.btn{border:1px solid #d9c9bd;background:#fffefd;border-radius:7px;min-height:39px;padding:8px 12px;font-weight:700;font-size:11px;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.btn.primary{background:var(--brown);color:white;border-color:var(--brown)}
.btn.pink{background:var(--pink);color:white;border-color:var(--pink)}
.btn.blue{background:var(--blue);color:white;border-color:var(--blue)}
.btn.orange{background:var(--orange);color:white;border-color:var(--orange)}
.btn.green{background:var(--green);color:white;border-color:var(--green)}
.btn.danger{background:var(--danger);color:white;border-color:var(--danger)}
.btn.ghost{background:transparent}
.btn.block{width:100%}
.btn.small{min-height:31px;padding:5px 9px;font-size:9.5px}
.btn:disabled{opacity:.45;cursor:not-allowed}
.empty-state{text-align:center;padding:72px 24px 36px;color:var(--muted)}
.empty-icon{height:56px;display:grid;place-items:center;color:#b8a18e}
.empty-icon svg{width:48px;height:48px;fill:none;stroke:currentColor;stroke-width:1.45;opacity:.78}
.empty-state h3{font-size:12px;color:var(--text);margin:14px 0 6px}
.empty-state p{font-size:10px;line-height:1.7;margin:0 0 15px}
.fab-stack{position:fixed;right:13px;bottom:calc(72px + var(--safe-bottom));z-index:24;display:flex;gap:9px;align-items:flex-end}
.fab{height:46px;min-width:46px;border:0;border-radius:10px;background:var(--brown);color:white;box-shadow:0 5px 14px rgba(73,45,31,.27);display:grid;place-items:center;padding:0 13px;font-size:12px;font-weight:700}
.fab svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.fab.secondary{width:42px;height:42px;min-width:42px;background:white;color:var(--brown);border:1px solid #e4d3c7;padding:0}
.fab.pink{background:var(--pink);min-width:108px;display:flex;gap:6px}
.form-page{padding:10px 10px 25px;max-width:620px;margin:0 auto}
.form-top-switch{display:flex;justify-content:center;margin:2px 0 12px}
.pill-switch{display:grid;grid-auto-flow:column;border:1px solid var(--line-strong);border-radius:999px;overflow:hidden;background:#fff}
.pill-switch button{min-width:78px;border:0;background:transparent;padding:7px 11px;font-size:10px;color:#5e4e44}
.pill-switch button.active{background:#ead9ce;font-weight:700;color:#4f2f1e}
.photo-box{width:105px;height:123px;border:1px solid var(--line-strong);border-radius:13px;margin:0 auto 15px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;background:#f2e7df;overflow:hidden;position:relative;color:#6d422a}
.photo-box svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;background:white;border-radius:50%;padding:6px;box-sizing:content-box}
.photo-box small{font-size:8px;color:#5d3b28}
.photo-box img{width:100%;height:100%;object-fit:cover}
.photo-box input{position:absolute;inset:0;opacity:0}
.form-section{margin:17px 0}
.form-section h3{font-size:11px;margin:0 0 9px;padding-left:8px;border-left:2px solid var(--brown);line-height:1.35}
.form-section .section-note{display:block;font-size:8px;color:var(--muted);font-weight:400;margin-top:2px}
.field{margin-bottom:8px;min-width:0}
.field>label:not(.control-shell){display:block;font-size:9px;color:#65534a;margin:0 3px 4px;font-weight:700}
.field-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.field-row.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.control-shell{width:100%;min-height:43px;border:1px solid #dccbbc;border-radius:8px;background:#fffefd;padding:5px 8px;display:flex;align-items:center;gap:7px;position:relative;overflow:hidden}
.control-shell.accent{background:#f5e7dc;border-color:#8d5a3c}
.control-shell.soft{background:#fafafa;border-color:#e7e7e7;color:#999}
.control-icon{width:16px;height:16px;flex:0 0 auto;color:#8a684f;display:grid;place-items:center}
.control-icon svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.control-stack{min-width:0;flex:1;display:flex;flex-direction:column;justify-content:center}
.control-label{font-size:8px;color:#8d8077;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.control-input{width:100%;border:0;outline:0;background:transparent;font-size:10.5px;line-height:1.4;padding:1px 0 0;min-width:0}
.control-input::placeholder{color:#a59b95}
.control,.field select.control,.field input.control,textarea.control{width:100%;min-height:43px;border:1px solid #dccbbc;border-radius:8px;background:#fffefd;padding:9px 10px;outline:none;font-size:10.5px}
textarea.control{min-height:83px;resize:vertical;line-height:1.55}
.control:focus,.control-shell:focus-within{border-color:var(--line-strong);box-shadow:0 0 0 2px rgba(154,98,65,.10)}
.field-hint,.hint{font-size:8px;color:var(--muted);margin:3px 3px 0;line-height:1.5}
.char-count{text-align:right;font-size:7px;color:#9f948d;margin-top:2px}
.toggle-group{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;border:1px solid var(--line-strong);border-radius:7px;overflow:hidden;background:white}
.toggle-group label{border:0;border-right:1px solid var(--line-strong);padding:7px 5px;background:white;text-align:center;font-size:9px;margin:0;font-weight:500;white-space:nowrap}
.toggle-group label:last-child{border-right:0}
.toggle-group label.selected{background:#ead8cc;font-weight:700;color:#4f2e1d}
.toggle-group input{display:none}
.check-row{display:flex;align-items:center;gap:7px;font-size:9px;padding:5px 2px;color:#6b536e}
.check-row input{width:15px;height:15px;accent-color:var(--brown)}
.lineage-selector{background:white;border-radius:10px;border:1px solid #eee4dd;padding:10px;box-shadow:var(--shadow)}
.lineage-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;height:100px;overflow:hidden}
.lineage-column{display:flex;flex-direction:column;gap:3px;overflow:auto;scrollbar-width:none;mask-image:linear-gradient(transparent,#000 14%,#000 86%,transparent)}
.lineage-column::-webkit-scrollbar{display:none}
.lineage-option{border:0;border-radius:5px;background:#f5ebe4;color:#8d7c72;min-height:27px;font-size:10px;font-weight:600}
.lineage-option.active{background:#ead9cc;color:#57341f}
.lineage-result{display:flex;justify-content:center;margin-top:8px}
.parent-field .control-shell{background:#fafafa;border-color:#e8e8e8}
.parent-field select{color:#aaa}
.inline-choice-row{display:grid;grid-template-columns:1fr auto;gap:6px;align-items:end}
.mini-select{height:43px;border:1px solid #dccbbc;border-radius:8px;background:#fffefd;padding:0 9px;font-size:9px;min-width:57px}
.choice-button{height:35px;border:1px solid #e1d4ca;background:#fff;border-radius:6px;font-size:8px;padding:0 9px;white-space:nowrap}
.choice-button.active{background:#ead9cc;border-color:#c5a68f;color:#57331f;font-weight:700}
.sticky-submit{padding:8px 0 2px}
.overlay{position:fixed;z-index:90;inset:0;background:rgba(33,26,22,.48);display:flex;align-items:flex-end;justify-content:center}
.modal{width:min(100%,620px);max-height:91dvh;background:var(--bg);border-radius:18px 18px 0 0;overflow:auto;padding:16px 12px calc(16px + var(--safe-bottom));box-shadow:0 -12px 30px rgba(0,0,0,.16)}
.modal.center{align-self:center;border-radius:15px;max-width:390px;max-height:86dvh;margin:14px}
.modal h2{font-size:15px;margin:0 0 11px}.modal h3{font-size:12px}
.modal-close{float:right;border:0;background:#efe4dc;border-radius:50%;width:30px;height:30px;font-size:16px}
.toast{position:fixed;z-index:130;left:50%;bottom:calc(75px + var(--safe-bottom));transform:translate(-50%,18px);background:#30231d;color:white;border-radius:8px;padding:9px 13px;font-size:10px;opacity:0;pointer-events:none;transition:.2s;white-space:nowrap;max-width:90vw;overflow:hidden;text-overflow:ellipsis}
.toast.show{opacity:1;transform:translate(-50%,0)}
.update-banner{position:fixed;z-index:140;top:calc(8px + var(--safe-top));left:50%;transform:translateX(-50%);background:#34251e;color:#fff;border-radius:999px;padding:8px 13px;font-size:9px;box-shadow:0 4px 16px rgba(0,0,0,.2)}
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.stat-card{background:white;border:1px solid #eadfd7;border-radius:9px;padding:11px 5px;text-align:center;box-shadow:var(--shadow)}
.stat-card strong{display:block;font-size:18px;color:var(--brown);margin:4px 0}.stat-card small{font-size:8px;color:var(--muted)}
.output-intro{font-size:9px;color:var(--muted);line-height:1.65;padding:0 4px 6px}
.output-card{background:white;border:1px solid #ece2db;border-radius:10px;padding:12px;margin:8px 0;box-shadow:var(--shadow)}
.output-card-head{display:grid;grid-template-columns:34px 1fr;gap:9px;align-items:center;margin-bottom:7px}
.out-icon{width:32px;height:32px;border-radius:7px;display:grid;place-items:center;background:#f2e7df;color:var(--brown)}
.out-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.out-icon.pink{background:var(--pink-soft);color:var(--pink)}.out-icon.blue{background:var(--blue-soft);color:var(--blue)}.out-icon.orange{background:var(--orange-soft);color:var(--orange)}.out-icon.green{background:var(--green-soft);color:var(--green)}.out-icon.gold{background:var(--gold-soft);color:var(--gold)}
.output-card h3{font-size:11.5px;margin:0}.output-card p{font-size:8.5px;color:var(--muted);line-height:1.55;margin:0 0 8px}.output-card .output-note{font-size:7.5px;color:#61826a;margin:-2px 0 8px}
.list-group{background:white;border:1px solid #ece2db;border-radius:10px;overflow:hidden;box-shadow:var(--shadow);margin-bottom:12px}
.list-row{display:flex;align-items:center;gap:9px;background:white;border-bottom:1px solid #eee4dd;padding:11px 10px;min-height:54px}
.list-row:last-child{border-bottom:0}
.list-row.clickable{cursor:pointer}
.list-row .row-icon{width:27px;height:27px;border-radius:7px;background:#f4ebe5;display:grid;place-items:center;color:#8b654c;flex:0 0 auto}
.list-row .row-icon svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.list-row .row-main{flex:1;min-width:0}.list-row .row-main strong{display:block;font-size:10.5px}.list-row .row-main small{display:block;color:var(--muted);font-size:8px;margin-top:3px;line-height:1.4}
.chevron{color:#9b8c83;font-size:17px}
.ios-switch{position:relative;width:40px;height:24px;flex:0 0 auto}.ios-switch input{opacity:0;width:0;height:0}.ios-switch span{position:absolute;inset:0;border-radius:999px;background:#ddd0c5;transition:.18s}.ios-switch span:after{content:"";position:absolute;left:2px;top:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);transition:.18s}.ios-switch input:checked+span{background:#bf8d63}.ios-switch input:checked+span:after{transform:translateX(16px)}
.settings-section-label{font-size:9px;color:#6f5c51;margin:15px 4px 6px;font-weight:700}
.profile-card{padding:14px 8px 10px;text-align:center}
.profile-avatar{width:56px;height:56px;border-radius:50%;background:#eee7e2;margin:0 auto 8px;display:grid;place-items:center;color:#b9aca4}
.profile-avatar svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:1.5}
.profile-card h2{font-size:15px;margin:0 0 4px}.profile-card p{font-size:8.5px;color:var(--muted);margin:0 0 11px}
.premium-card{display:flex;align-items:center;gap:10px;background:#fffdf7;border:1px solid #ecdca8;border-radius:10px;padding:11px;margin:8px 0 10px}
.premium-icon{width:31px;height:31px;border-radius:8px;background:var(--gold-soft);color:var(--gold);display:grid;place-items:center}.premium-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.premium-card strong{font-size:10.5px}.premium-card small{display:block;font-size:8px;color:var(--muted);margin-top:2px}
.record-card{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#c99b12,#a97700);color:#fff;border-radius:10px;padding:13px;margin:9px 0;box-shadow:0 4px 13px rgba(157,111,0,.2)}
.record-card strong{font-size:12px}.record-card small{display:block;font-size:8px;opacity:.82;margin-top:3px}
.room-stats{display:grid;gap:7px}
.room-stat{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:9px;background:#fff;border:1px solid #ece2db;border-radius:10px;padding:10px;box-shadow:var(--shadow)}
.room-stat-icon{width:32px;height:32px;border-radius:50%;background:#f3ebe5;display:grid;place-items:center;color:var(--brown)}
.room-stat-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}
.room-stat strong{font-size:10.5px}.room-stat small{display:block;font-size:8px;color:var(--muted);margin-top:2px}.room-stat .room-count{font-size:17px;font-weight:700;color:#3f342e}.room-stat .room-count em{font-size:8px;font-style:normal;color:var(--muted);margin-left:2px}
.portfolio-toggle{display:flex;justify-content:flex-end;margin:-31px 1px 8px}.portfolio-toggle .pill-switch button{min-width:52px;padding:5px 8px;font-size:8px}
.portfolio-empty{background:#fff;border:1px solid #e8ddd5;border-radius:10px;min-height:94px;display:grid;place-items:center;color:var(--muted);font-size:9px;box-shadow:var(--shadow)}
.task-row{display:grid;grid-template-columns:25px 1fr 31px;gap:7px;align-items:start}
.task-check{width:21px;height:21px;border-radius:6px;border:1.5px solid var(--line-strong);background:white;margin-top:1px}
.task-check.done{background:var(--brown);color:white}
.calendar-head{display:flex;justify-content:space-between;align-items:center;padding:8px 0}.calendar-head strong{font-size:13px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.cal-day-name{text-align:center;font-size:8px;color:var(--muted);padding:4px 0}.cal-cell{min-height:46px;background:white;border:1px solid #eee1d8;border-radius:6px;padding:4px;font-size:8px;position:relative}.cal-cell.muted{opacity:.32}.cal-cell.today{outline:1.5px solid var(--brown)}.cal-cell .dots{display:flex;gap:2px;position:absolute;left:4px;bottom:4px}.dot{width:4px;height:4px;border-radius:50%;background:var(--pink)}
.info-box{background:#f1e5dc;border-radius:8px;padding:10px;font-size:9px;line-height:1.65;color:#5d4a3e}
.hero{background:#fff;border:1px solid #e9ddd4;border-radius:10px;padding:13px;margin:9px 0;box-shadow:var(--shadow)}
.hero h2{font-size:15px;margin:0 0 5px}.hero p{font-size:9px;color:var(--muted);line-height:1.55;margin:0}
.manual-tip{background:#f4e7dc;border:1px solid #e8d4c5;border-radius:9px;padding:10px;margin:7px 0 9px;font-size:8.5px;line-height:1.6;color:#6a5040}
.manual-section{background:white;border:1px solid #eadfd7;border-radius:9px;padding:11px;margin:8px 0;box-shadow:0 1px 5px rgba(68,43,30,.05)}.manual-section h3{font-size:10.5px;margin:0 0 6px}.manual-section p,.manual-section li{font-size:8.5px;line-height:1.68;color:#65534a}.manual-section ol,.manual-section ul{padding-left:18px}
.qr-grid{width:180px;height:180px;display:grid;grid-template-columns:repeat(21,1fr);background:white;padding:8px;border:1px solid #ddd;margin:12px auto;border-radius:6px}.qr-grid i{display:block}.qr-grid i.on{background:#1e1714}
.banner{margin:8px 0 10px;border-radius:9px;overflow:hidden;background:#e8f1fb;border:1px solid #d4e1ef;padding:9px;font-size:8.5px;color:#355774}
.inline-count{display:inline-grid;place-items:center;min-width:19px;height:19px;border-radius:999px;background:var(--brown);color:#fff;font-size:8px;padding:0 5px}
.select-list{max-height:48dvh;overflow:auto}.select-item{display:flex;gap:9px;align-items:center;padding:10px;border-bottom:1px solid #eee;font-size:10px}.select-item input{width:16px;height:16px;accent-color:var(--brown)}
.codebox{white-space:pre-wrap;background:#fff;border:1px solid #e5d8ce;border-radius:9px;padding:10px;font-size:9.5px;line-height:1.65;max-height:35dvh;overflow:auto}
@media (min-width:700px){.bottom-nav,.app-header{left:50%;width:700px;transform:translateX(-50%)}.fab-stack{right:calc((100vw - 674px)/2)}}
@media print{.app-header,.bottom-nav,.fab-stack,.no-print,.update-banner{display:none!important}.main{padding:0}.page{max-width:none;padding:0}body{background:white}.print-label-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7mm}.print-label{border:1px solid #555;height:58mm;padding:4mm;page-break-inside:avoid}.print-label h3{font-size:12pt;margin:0 0 3mm}.print-label p{font-size:8.5pt;line-height:1.5;margin:0}.print-report{padding:12mm}.print-report h1{font-size:20pt}.print-report table{width:100%;border-collapse:collapse}.print-report th,.print-report td{border:1px solid #777;padding:2.5mm;font-size:9pt;text-align:left}}

/* --------------------------------------------------------------------------
   BeetLog legacy alignment layer
   -------------------------------------------------------------------------- */
.individual-list-page{padding-left:15px;padding-right:15px}
.individual-list-page .top-nav-tabs{margin-left:-15px;margin-right:-15px;height:64px;background:#fbf6f1}
.individual-list-page .top-nav-tab{font-size:10px;gap:4px}
.individual-list-page .top-nav-tab svg{width:20px;height:20px}
.individual-list-page .searchbox{height:42px;border-radius:9px;margin:10px 0 9px;padding:0 12px}
.individual-list-page .searchbox input{font-size:12px}
.filter-toolbar{display:flex;align-items:center;gap:7px;overflow-x:auto;padding:0 0 8px;scrollbar-width:none}
.filter-toolbar::-webkit-scrollbar{display:none}
.filter-main{min-height:31px;padding:7px 10px;border-radius:7px;display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:600}
.filter-main svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.7}
.favorite-chip.favorite-active{background:#fff0a9;border-color:#e0bd32;color:#715400}
.species-chip-row,.stage-chip-row{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:7px}
.species-chip-row::-webkit-scrollbar,.stage-chip-row::-webkit-scrollbar{display:none}
.species-chip-row .chip,.stage-chip-row .chip{font-size:10px;min-height:29px;padding:6px 10px}
.filter-empty{min-height:245px;display:grid;place-items:center;text-align:center;color:#a39a94;font-size:11px;padding:45px 12px}
.species-group-card{background:#fff;border:1px solid #eadfd7;border-radius:11px;margin:8px 0 10px;overflow:hidden;box-shadow:0 2px 8px rgba(71,45,31,.07)}
.species-group-head{width:100%;border:0;background:#fff;padding:12px 13px;display:flex;align-items:center;justify-content:space-between;text-align:left;color:var(--text)}
.species-group-head>span:first-child{display:grid;min-width:0;gap:2px}
.species-group-head strong{font-size:13px;line-height:1.35}
.species-group-head em{font-size:9px;line-height:1.35;color:#96877e;font-style:italic;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.species-group-head small{font-size:9px;color:#766960;margin-top:2px}
.group-chevron{font-size:16px;color:#8f7f75;padding-left:10px}
.species-group-body{border-top:1px solid #f0e7e1;background:#fdfbf9}
.subspecies-block+.subspecies-block{border-top:1px solid #eee5df}
.subspecies-head{width:100%;border:0;background:#fbf7f3;padding:9px 13px;display:flex;justify-content:space-between;align-items:center;font-size:10.5px;font-weight:700;color:#59483e}
.subspecies-items{background:#fff}
.individual-list-item{width:100%;border:0;border-top:1px solid #f1e8e2;background:#fff;padding:10px 12px;display:grid;grid-template-columns:48px 1fr 16px;gap:10px;align-items:center;text-align:left}
.individual-list-item:first-child{border-top:0}
.list-photo{width:48px;height:48px;border-radius:8px;overflow:hidden;background:#79503a;color:#fff;display:grid;place-items:center;font-size:17px;font-weight:800;position:relative}
.list-photo img{width:100%;height:100%;object-fit:cover}
.list-individual-main{min-width:0;display:block}
.list-individual-main strong{display:block;font-size:12px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list-individual-main small{display:block;font-size:9px;color:#8e8178;margin-top:3px}
.list-individual-main>span{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
.list-individual-main i{font-style:normal;font-size:8.5px;background:#edf4f7;color:#426b7d;border:1px solid #c8dce5;border-radius:4px;padding:2px 5px}
.option-title{font-size:16px!important;text-align:center;margin:2px 0 10px!important}
.option-list{background:#fff;border:1px solid #eadfd7;border-radius:11px;overflow:hidden;margin-bottom:10px}
.option-row{width:100%;min-height:48px;border:0;border-bottom:1px solid #eee5df;background:#fff;text-align:left;padding:0 15px;font-size:13px}
.option-row:last-child{border-bottom:0}.option-row.selected{color:var(--brown);font-weight:700;background:#faf4ef}

/* Registration screen */
.form-page{padding:10px 19px 34px;max-width:540px}
.form-top-switch{margin:5px auto 12px;width:max-content}
.form-top-switch button{min-width:100px;padding:8px 14px;font-size:11px}
.photo-box{width:132px;height:148px;border-radius:17px;margin:4px auto 24px;background:#fbf6f1;display:flex;flex-direction:column;gap:7px;align-items:center;justify-content:center;color:#76503a}
.photo-box svg{width:30px;height:30px}.photo-box small{font-size:10px;font-weight:700}
.form-section{margin:0 0 26px}
.form-section>h3{font-size:16px;margin:0 0 13px;display:flex;align-items:center;gap:7px;color:#2f2824}
.form-section>h3:before{content:"";width:4px;height:22px;border-radius:4px;background:#704328;flex:0 0 auto}
.form-section .section-note{display:block;font-size:9px;color:#9a8d84;font-weight:400;margin-left:1px}
.field{margin-bottom:10px}
.control-shell{min-height:58px;border:1px solid #d9b994;border-radius:12px;background:#fff;display:flex;align-items:center;gap:10px;padding:8px 12px;width:100%;text-align:left}
.control-shell.accent{border:2px solid #754428;background:#f1e2d5;min-height:62px}
.control-icon{width:27px;display:grid;place-items:center;color:#7a674f;flex:0 0 auto}
.control-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.control-stack{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.control-label{font-size:11px;color:#78675d;line-height:1.15}
.control-input{border:0;background:transparent;outline:0;padding:0;width:100%;min-width:0;font-size:15px;height:24px;color:#2d2825}
.control-input::placeholder{color:#9d9188}
select.control-input{-webkit-appearance:none;appearance:none}
.picker-shell{position:relative}
.picker-value{font-size:15px;font-weight:700;color:#65412a;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.picker-value.placeholder{color:#704b35}
.species-request{text-align:right;color:#6e4025;font-size:10px;padding:7px 8px 0}
.field-hint{font-size:9px;color:#908178;line-height:1.5;padding:4px 7px 0}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.toggle-group{display:flex;border:1.5px solid #754428;border-radius:999px;overflow:hidden;background:#fff}
.toggle-group label{min-height:38px;display:flex;align-items:center;justify-content:center;border-right:1px solid #754428;padding:7px 12px;font-size:12px;color:#66472f;flex:1;white-space:nowrap}
.toggle-group label:last-child{border-right:0}
.toggle-group label.selected{background:#ead9cc;color:#58331f}
.check-row{font-size:11px;padding:4px 7px 11px;color:#7b2787;gap:8px}
.check-row input{width:18px;height:18px}
.inline-choice-row{grid-template-columns:1fr auto;align-items:center;margin:6px 0 2px}
.inline-choice-row>label{font-size:12px!important}
.parent-field{display:grid;gap:10px}
.parent-field .control-shell{background:#fbfaf9;border-color:#dfd7d2}
.sticky-submit{position:sticky;bottom:6px;z-index:10;padding:9px 0 calc(4px + var(--safe-bottom));background:linear-gradient(transparent,var(--bg) 25%)}
.sticky-submit .btn{min-height:50px;border-radius:11px;font-size:14px}

/* Inline lineage drum rolls */
.lineage-selector{position:relative;border:0;border-radius:12px;background:#fff;padding:0 0 10px;box-shadow:0 1px 7px rgba(72,44,29,.08);overflow:hidden}
.lineage-grid{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:0;height:146px;overflow:hidden;background:#fff}
.lineage-grid:before,.lineage-grid:after{content:"";position:absolute;left:0;right:0;height:44px;z-index:3;pointer-events:none}
.lineage-grid:before{top:0;background:linear-gradient(#fff 20%,rgba(255,255,255,.88),rgba(255,255,255,0))}
.lineage-grid:after{bottom:0;background:linear-gradient(rgba(255,255,255,0),rgba(255,255,255,.88),#fff 80%)}
.lineage-highlight{position:absolute;top:51px;height:44px;background:#f0e7e1;border-radius:8px;z-index:0;pointer-events:none}
.lineage-highlight.left{left:13px;width:calc(50% - 19px)}.lineage-highlight.right{left:calc(50% + 6px);right:13px}
.inline-wheel-column{height:146px;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;overscroll-behavior:contain;z-index:1;padding:0 6px}
.inline-wheel-column::-webkit-scrollbar{display:none}
.inline-wheel-spacer{height:51px;flex:0 0 51px}
.inline-wheel-item{display:flex;width:100%;height:44px;border:0;background:transparent;align-items:center;justify-content:center;scroll-snap-align:center;font-size:13px;color:#9a8d84;position:relative;z-index:2}
.inline-wheel-item.active{font-size:15px;font-weight:700;color:#653f28}
.lineage-result{margin-top:4px;min-height:34px;align-items:center}
.lineage-result .badge{font-size:11px;padding:7px 12px;background:#ead9cc;color:#63412b}

/* Species picker */
.picker-modal-head{display:grid;grid-template-columns:72px 1fr 72px;align-items:center;margin:-4px 0 12px}
.picker-modal-head h2{text-align:center;margin:0!important}.picker-modal-head button{border:0;background:transparent;font-size:12px;color:#754428;padding:8px 3px}.picker-modal-head button:last-child{text-align:right}
.species-modal-search{height:44px;margin-bottom:9px}
.species-option-list{background:#fff;border:1px solid #e7ddd6;border-radius:11px;overflow:hidden;max-height:58dvh;overflow-y:auto}
.species-option{width:100%;border:0;border-bottom:1px solid #eee5df;background:#fff;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;text-align:left}
.species-option:last-child{border-bottom:0}.species-option.selected{background:#f6ede6;color:#6b3f25}
.species-option span{min-width:0}.species-option strong{display:block;font-size:13px}.species-option em{display:block;font-size:10px;color:#90837a;font-style:italic;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* iOS-style bottom drum roll */
.wheel-overlay{background:rgba(21,16,13,.56)}
.wheel-sheet{width:min(100%,620px);background:#fffaf7;border-radius:23px 23px 0 0;padding:0 10px calc(24px + var(--safe-bottom));box-shadow:0 -12px 38px rgba(0,0,0,.2);overflow:hidden}
.wheel-sheet-head{height:61px;display:grid;grid-template-columns:90px 1fr 90px;align-items:center;border-bottom:1px solid #eee4dd}
.wheel-sheet-head strong{text-align:center;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wheel-sheet-head button{border:0;background:transparent;color:#6b3e25;font-size:13px;font-weight:700;padding:12px 8px}
.wheel-sheet-head button:first-child{text-align:left}.wheel-sheet-head button:last-child{text-align:right}
.wheel-picker{--row-height:42px;position:relative;height:224px;display:grid;grid-template-columns:repeat(var(--wheel-columns),minmax(0,1fr));overflow:hidden}
.wheel-picker:before,.wheel-picker:after{content:"";position:absolute;left:0;right:0;height:84px;z-index:5;pointer-events:none}
.wheel-picker:before{top:0;background:linear-gradient(#fffaf7 12%,rgba(255,250,247,.85),rgba(255,250,247,0))}
.wheel-picker:after{bottom:0;background:linear-gradient(rgba(255,250,247,0),rgba(255,250,247,.85),#fffaf7 88%)}
.wheel-selection{position:absolute;left:1px;right:1px;top:91px;height:42px;border-radius:8px;background:#eee8e5;z-index:0;pointer-events:none}
.wheel-column{height:224px;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;overscroll-behavior:contain;position:relative;z-index:2;padding:0 3px}
.wheel-column::-webkit-scrollbar{display:none}
.wheel-pad{height:91px;flex:0 0 91px}
.wheel-value{width:100%;height:40px;border:0;background:transparent;display:flex;align-items:center;justify-content:center;scroll-snap-align:center;color:#968c86;font-size:18px;white-space:nowrap}
.wheel-value.selected{font-size:19px;color:#211c19;font-weight:500}
.ambiguous-button{height:54px;border:1px solid #d9c5b7;border-radius:11px;background:#f1e7df;color:#72503b;font-size:12px;padding:0 16px;white-space:nowrap}

/* Individual detail */
.app-header.detail-mode{grid-template-columns:43px minmax(72px,1fr) 235px;padding-left:8px;padding-right:5px}
.app-header.detail-mode .header-title-wrap{text-align:left;padding-left:2px}
.app-header.detail-mode h1{font-size:16px}
.header-button.detail-actions{width:235px;height:44px;padding:0;display:flex;justify-content:flex-end;align-items:center;gap:1px;border-radius:0}
.header-button.detail-actions>span{width:43px;height:42px;display:grid;place-items:center;font-size:25px;color:#754428;border-radius:8px}
.header-button.detail-actions>span svg{width:19px;height:19px}
.header-button.detail-actions .detail-favorite{font-size:28px;color:#9b9b9b;font-weight:300}
.detail-page{max-width:540px;margin:0 auto;padding:23px 19px 42px;background:#fffaf7;min-height:calc(100dvh - 54px - var(--safe-top))}
.specimen-summary{display:grid;grid-template-columns:72px 1fr;gap:18px;align-items:start}
.specimen-photo{width:72px;height:72px;border-radius:14px;background:#754126;color:#fff;display:grid;place-items:center;position:relative;overflow:hidden}
.specimen-photo>strong{font-size:28px}.specimen-photo img{width:100%;height:100%;object-fit:cover}.specimen-photo>span{position:absolute;right:-2px;bottom:-2px;width:24px;height:24px;border-radius:8px;background:#fff;border:2px solid #754126;color:#754126;display:grid;place-items:center}.specimen-photo>span svg{width:13px;height:13px}
.specimen-copy{min-width:0}.specimen-copy h2{font-size:20px;line-height:1.28;margin:0 0 3px;font-weight:800;letter-spacing:.01em}.specimen-copy em{display:block;color:#9a918b;font-size:12px;font-style:italic;margin-bottom:6px}
.specimen-badges{display:flex;gap:8px;flex-wrap:wrap;margin:2px 0 6px}
.tag{font-style:normal;border-radius:4px;padding:3px 8px;font-size:10px;border:1px solid currentColor;line-height:1.25}.tag.green{color:#078d83;background:#dff8f2}.tag.blue{color:#366d8d;background:#e6f1f8}
.specimen-final{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.specimen-final>b{font-size:11px;color:#704426}.sex-pill{font-style:normal;border:1px solid #d9b488;background:#f1e1d2;border-radius:999px;padding:3px 9px;font-size:10px;color:#694127}
.ancestry-button{width:100%;height:55px;border:1.5px solid #754428;background:#fff;border-radius:12px;margin:18px 0 27px;display:flex;align-items:center;justify-content:center;gap:9px;color:#754428;font-size:14px;font-weight:800}.ancestry-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.timeline-section{margin-bottom:23px}.detail-section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.detail-section-head h3{font-size:17px;margin:0}.detail-section-head>span{font-size:9px;color:#8f8178}.detail-section-head button{border:0;background:transparent;color:#7a4429;font-size:11px;font-weight:700}
.growth-timeline{height:105px;border:1px solid #d7b68c;border-radius:13px;background:#fff;display:grid;grid-template-columns:repeat(6,1fr);align-items:center;padding:13px 8px 10px;position:relative;overflow:hidden}
.growth-timeline:before{content:"";position:absolute;left:9%;right:9%;top:47px;height:5px;background:#815347;z-index:0;border-radius:4px}
.timeline-node{position:relative;z-index:1;border:0;background:transparent;display:flex;flex-direction:column;align-items:center;gap:9px;padding:0;min-width:0}.timeline-node i{width:31px;height:31px;border-radius:50%;background:#fff;border:7px solid #765046;display:grid;place-items:center;font-style:normal;color:#fff;font-size:12px}.timeline-node span{font-size:9px;color:#7b6f69}.timeline-node.current i{width:36px;height:36px;background:#ffbc00;border:4px solid #765046;box-shadow:inset 0 0 0 3px #ffbc00;color:#fff}.timeline-node.current span{font-weight:700;color:#5f4c41}.timeline-node:not(.passed) i{border-color:#d6cbc5}.timeline-node:not(.passed){opacity:.72}
.temperature-row{width:100%;height:43px;border:1px solid #d8b588;border-radius:10px;background:#fff;display:grid;grid-template-columns:23px 1fr 22px;align-items:center;text-align:left;padding:0 13px;color:#704426;margin-bottom:10px}.temperature-row strong{font-size:11px}.temperature-row svg{fill:none;stroke:currentColor;stroke-width:1.8}
.maturity-card{background:#e1f1e6;border-radius:22px;padding:22px 24px 21px;margin-bottom:25px}.maturity-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.maturity-head h3{margin:0;display:flex;align-items:center;gap:8px;color:#43ad46;font-size:15px}.maturity-head h3 svg{fill:none;stroke:currentColor;stroke-width:1.8}.maturity-head>span{font-size:10px;color:#287b36;background:#fff;border-radius:999px;padding:4px 8px}
.eclosion-box{min-height:71px;background:#fff;border:1px solid #bf40cb;border-radius:12px;display:grid;grid-template-columns:34px 1fr;align-items:center;padding:11px 14px;color:#272122;margin-bottom:18px}.eclosion-box>svg{color:#b225cb;fill:none;stroke:currentColor;stroke-width:1.8}.eclosion-box strong{display:block;font-size:12px}.eclosion-box b{display:block;font-size:11px;color:#be29cd;margin-top:5px}
.feeding-start-button{width:100%;min-height:55px;border:0;border-radius:10px;background:#3fb047;color:#fff;font-size:14px;font-weight:800;padding:10px}.feeding-start-row{display:flex;align-items:center;justify-content:space-between;font-size:11px}.feeding-start-row button{border:0;background:transparent;color:#417f45;font-size:10px}.maturity-card hr{border:0;border-top:1px solid rgba(47,139,59,.2);margin:15px 0}.daily-label{display:block;font-size:10px;color:#318b3a;margin-bottom:9px}.jelly-row{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:8px}.jelly-row>span{color:#3da744}.jelly-row strong{display:block;font-size:10.5px}.jelly-row small{font-size:9px;color:#6c7d70}.jelly-row button{border:0;border-radius:8px;background:#3fb047;color:white;font-size:10px;font-weight:700;padding:9px 11px}
.detail-size-section{border-top:2px solid #64ac6d;padding-top:5px;margin-bottom:27px}.detail-size-section>label{font-size:10px;color:#8f8178;display:block;margin-bottom:8px}.size-confirm-row{display:grid;grid-template-columns:1fr 75px;gap:10px}.size-confirm-row input{height:54px;border:1px solid #d8b588;border-radius:11px;background:#fff;padding:0 16px;font-size:14px;outline:0}.size-confirm-row button{border:0;border-radius:10px;background:#754126;color:#fff;font-weight:800;font-size:15px}.free-size-button{height:49px;border:1.5px solid #754126;border-radius:10px;background:#fff;margin-top:10px;padding:0 15px;font-size:13px;font-weight:700;color:#754126}.detail-toggle-label{font-size:10px;color:#8e8178;border-top:2px solid #64ac6d;padding-top:12px;margin:27px 0 8px}.detail-toggle{display:grid;grid-template-columns:1fr 1fr;border:1.5px solid #754126;border-radius:999px;overflow:hidden}.detail-toggle button{height:38px;border:0;border-right:1px solid #754126;background:#fff;font-size:12px}.detail-toggle button:last-child{border-right:0}.detail-toggle button.active{background:#ead9cc;color:#633c25;font-weight:800}.detail-note{font-size:10px;color:#9a655e;background:#fff1ee;border-radius:8px;padding:9px;margin-top:7px}
.trade-status-card{background:#e5f2f8;border-radius:12px;padding:14px 15px;margin-bottom:12px}.trade-status-card label{display:flex;align-items:center;gap:7px;font-size:11px;color:#3f7088;font-weight:700}.trade-status-card select{width:100%;height:42px;margin:8px 0 5px;border:1px solid #aacbda;border-radius:8px;background:#fff;padding:0 10px;font-size:11px}.trade-status-card p{margin:0;font-size:8.5px;line-height:1.55;color:#648493}
.finish-breeding{width:100%;height:48px;border:1px solid #d2af76;background:#fff7e5;color:#89600c;border-radius:10px;font-size:12px;font-weight:700;margin-bottom:27px}
.history-section{border-top:1px solid #e6d9d0;padding-top:18px}.history-list{background:#fff;border:1px solid #eadfd8;border-radius:11px;overflow:hidden}.history-row{display:grid;grid-template-columns:30px 1fr;gap:9px;padding:12px;border-bottom:1px solid #eee5df}.history-row:last-child{border-bottom:0}.history-row>span{width:28px;height:28px;border-radius:7px;background:#f4ebe4;display:grid;place-items:center;color:#754428}.history-row strong{display:block;font-size:11px}.history-row small{display:block;font-size:8.5px;color:#8e8178;margin-top:2px}.history-row p{font-size:9px;color:#62534b;margin:5px 0 0;line-height:1.5}.history-empty{text-align:center;color:#9c918b;font-size:10px;padding:24px}
.compact-dialog,.feeding-dialog{padding:3px}.compact-dialog h2,.feeding-dialog h2{font-size:17px;margin:0 0 13px}.feeding-dialog>p{font-size:11px;line-height:1.6;color:#786c65}.dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:15px}.dialog-actions button{height:44px;border:1px solid #d6c6bb;border-radius:9px;background:#fff;font-size:12px;font-weight:700}.dialog-actions button:last-child{background:#754428;color:#fff;border-color:#754428}.dialog-actions .green-action{background:#3ead49;border-color:#3ead49}

/* Ancestry */
.ancestry-page{max-width:540px;margin:0 auto;padding:20px 18px 40px}.tree-breadcrumb{font-size:11px;color:#6f4a34;background:#efe1d6;border-radius:9px;padding:10px 12px;display:flex;align-items:center;gap:6px}.tree-breadcrumb span{margin-left:auto;font-weight:700}.tree-current{display:flex;justify-content:center;margin:28px 0 8px}.tree-parents{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:35px}.tree-node{position:relative;min-height:80px;border:1.5px solid #825238;border-radius:12px;background:#fff;padding:12px;text-align:left}.tree-node strong{display:block;font-size:12px}.tree-node small{display:block;font-size:9px;color:#8a7c74;margin-top:5px}.tree-node i{position:absolute;right:9px;top:9px;font-style:normal;color:#7a4528}.tree-lines{height:30px;border-left:1px solid #a98875;width:1px;margin:0 auto}.tree-missing{border:1px dashed #c9b8ac;border-radius:10px;display:grid;place-items:center;color:#9a8e87;font-size:10px;min-height:74px}.tree-empty{text-align:center;color:#94877f;padding:55px 25px}.tree-empty svg{margin:0 auto;color:#b8aaa1;fill:none;stroke:currentColor}.tree-empty strong{display:block;color:#564a43;font-size:13px;margin-top:13px}.tree-empty p{font-size:10px;line-height:1.65}

@media (max-width:390px){
  .app-header.detail-mode{grid-template-columns:40px minmax(64px,1fr) 218px}.header-button.detail-actions{width:218px}.header-button.detail-actions>span{width:40px}
  .form-page{padding-left:15px;padding-right:15px}.detail-page{padding-left:15px;padding-right:15px}.specimen-summary{grid-template-columns:68px 1fr;gap:13px}.specimen-photo{width:68px;height:68px}.specimen-copy h2{font-size:18px}
  .wheel-sheet-head{grid-template-columns:78px 1fr 78px}.wheel-sheet-head strong{font-size:13px}
}
.control-shell.single-line .control-stack{justify-content:center}
.control-shell.single-line .control-input{height:31px;font-size:14px}
.clean-helper{padding:5px 12px 0;color:#95877e}
.wheel-sheet-head button{white-space:nowrap;word-break:keep-all}
.form-section>h3{border-left:0;padding-left:0}
.sticky-submit{position:static;bottom:auto;z-index:auto;padding:9px 0 calc(4px + var(--safe-bottom));background:none}

/* ========================================================================
   BeetLog 1.3.0 — strict source-video layout (iPhone)
   ======================================================================== */
:root{
  --bg:#fbf4ed;
  --header:#f4e6da;
  --surface:#fffdfb;
  --surface-soft:#f6e9df;
  --line:#e6d7cb;
  --line-strong:#7a472c;
  --text:#2a211d;
  --muted:#90827a;
  --brown:#754326;
  --brown-dark:#4f2c1a;
  --brown-soft:#ead8ca;
  --pink:#cc3f76;
  --pink-soft:#fde5ef;
  --green:#43ad4b;
  --shadow:0 1px 5px rgba(73,43,27,.07);
}
html,body{background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif}
.app-shell{background:var(--bg)}
.app-header{
  height:calc(48px + var(--safe-top));
  padding:var(--safe-top) 10px 0;
  grid-template-columns:38px minmax(0,1fr) 38px;
  background:rgba(244,230,218,.98);
  border-bottom:1px solid rgba(100,61,36,.04);
}
.app-header h1{font-size:16px;font-weight:700;letter-spacing:.01em}
.header-button{width:36px;height:36px;padding:8px;border-radius:8px}
.header-button svg{width:18px;height:18px;stroke-width:1.65}
.main{padding-top:calc(48px + var(--safe-top));padding-bottom:calc(58px + var(--safe-bottom))}
.bottom-nav{
  height:calc(57px + var(--safe-bottom));
  padding:2px 0 var(--safe-bottom);
  background:rgba(255,254,252,.99);
  border-top:1px solid #e9ddd4;
}
.nav-item{gap:2px;padding:2px 0;color:#968b84}
.nav-item svg{width:17px;height:17px;stroke-width:1.55}
.nav-item small{font-size:8px}
.nav-item.active{color:var(--brown)}
.page{padding-left:9px;padding-right:9px;padding-bottom:18px}

/* Main list */
.individual-list-page{padding-left:9px;padding-right:9px}
.individual-list-page .top-nav-tabs{
  height:54px;margin:0 -9px 7px;background:#fbf6f1;border-bottom:1px solid #eee2da;
}
.individual-list-page .top-nav-tab{font-size:8.7px;gap:2px;padding:4px 0}
.individual-list-page .top-nav-tab svg{width:17px;height:17px}
.top-nav-tab.active:after{left:31%;right:31%;height:2px}
.individual-list-page .searchbox{height:34px;border-radius:7px;margin:6px 0 7px;padding:0 9px}
.individual-list-page .searchbox input{font-size:9.5px}
.filter-toolbar{gap:5px;padding:0 0 5px}
.filter-main{min-height:27px;padding:5px 8px;border-radius:6px;font-size:8.5px;gap:4px}
.filter-main svg{width:12px;height:12px}
.species-chip-row,.stage-chip-row{gap:4px;padding-bottom:5px}
.species-chip-row .chip,.stage-chip-row .chip{font-size:8.3px;min-height:25px;padding:4px 8px;border-radius:5px}
.chip{border-color:#dfd0c5}
.empty-state.video-empty{padding:54px 18px 26px}
.video-empty .empty-icon{height:61px;color:#bca995}
.empty-art{width:58px;height:58px}
.video-empty h3{font-size:11px;margin:10px 0 5px;color:#382d28}
.video-empty p{font-size:9px;line-height:1.65;margin-bottom:12px}
.guide-button{min-height:35px;border-color:#8a5b40;border-radius:7px;color:#704027;padding:7px 13px;font-size:9px;background:#fffaf6}
.species-group-card{border-radius:8px;margin:6px 0 8px;box-shadow:none}
.species-group-head{padding:9px 10px}
.species-group-head strong{font-size:10.5px}
.species-group-head em,.species-group-head small{font-size:7.7px}
.subspecies-head{min-height:36px;padding:0 10px;font-size:9px}
.individual-list-item{grid-template-columns:42px 1fr 14px;padding:8px 9px;gap:8px}
.list-photo{width:42px;height:42px;border-radius:7px;font-size:14px}
.list-individual-main strong{font-size:10px}.list-individual-main small{font-size:7.7px}.list-individual-main i{font-size:7px;padding:2px 4px}
.fab-stack{right:10px;bottom:calc(66px + var(--safe-bottom));gap:7px}
.fab{height:42px;min-width:42px;border-radius:9px;padding:0 11px;box-shadow:0 4px 11px rgba(74,43,27,.25)}
.fab.secondary{width:38px;height:38px;min-width:38px}
.fab svg{width:19px;height:19px}
.fab.pink{min-width:102px;height:38px;font-size:9px;border-radius:8px}

/* Forms */
.form-page{padding:8px 15px 24px;max-width:480px}
.form-top-switch{margin:3px auto 10px}
.pill-switch{border:1px solid #85533a}
.pill-switch button{min-width:91px;padding:6px 12px;font-size:9.5px;min-height:32px}
.photo-box{width:101px;height:119px;border-radius:13px;margin:2px auto 20px;background:#fcf7f2}
.photo-box svg{width:25px;height:25px}.photo-box small{font-size:8px}
.form-section{margin:0 0 20px}
.form-section>h3{font-size:13px;margin:0 0 10px;gap:6px}
.form-section>h3:before{width:4px;height:20px}
.form-section .section-note{font-size:7.5px}
.field{margin-bottom:8px}
.control-shell{min-height:43px;border-radius:7px;border-color:#d9b68c;padding:5px 9px;gap:7px}
.control-shell.accent{min-height:50px;border-width:2px;border-radius:9px;background:#f0dfd0}
.control-icon{width:20px}
.control-icon svg{width:16px;height:16px}
.control-stack{gap:1px}
.control-label{font-size:8px;color:#77685f}
.control-input{height:20px;font-size:10.5px}
.control-shell.single-line .control-input{height:25px;font-size:10.5px}
.picker-value{font-size:11.5px}.picker-value.placeholder{font-size:11px}
.species-request{font-size:7.5px;padding:5px 6px 0}
.field-hint,.clean-helper{font-size:7.5px;padding:4px 6px 0;line-height:1.35}
.field-row{gap:8px}
.toggle-group label{min-height:31px;padding:5px 8px;font-size:9px}
.check-row{font-size:8.5px;padding:3px 5px 8px}.check-row input{width:15px;height:15px}
.inline-choice-row{margin:4px 0}.inline-choice-row>label{font-size:8.5px!important}
.parent-field{gap:8px}
.sticky-submit{padding-top:5px}
.sticky-submit .btn{min-height:42px;border-radius:7px;font-size:10px}
textarea.control{min-height:74px;font-size:10px;border-radius:7px}

/* Inline lineage wheel exactly as shown in form */
.lineage-selector{border-radius:8px;padding-bottom:7px;box-shadow:none;border:1px solid #eadfd8}
.lineage-grid{height:116px}
.lineage-grid:before,.lineage-grid:after{height:37px}
.lineage-highlight{top:39px;height:38px;border-radius:5px;background:#f0e7df}
.lineage-highlight.left{left:8px;width:calc(50% - 12px)}
.lineage-highlight.right{left:calc(50% + 4px);right:8px}
.inline-wheel-column{height:116px;padding:0 4px}
.inline-wheel-spacer{height:39px;flex-basis:39px}
.inline-wheel-item{height:38px;font-size:9px}
.inline-wheel-item.active{font-size:11px}
.lineage-result{min-height:27px;margin-top:2px}.lineage-result .badge{font-size:8px;padding:5px 8px}

/* Bottom iOS drum roll */
.wheel-overlay{background:rgba(25,21,18,.56)}
.wheel-sheet{width:100%;max-width:520px;border-radius:19px 19px 0 0;padding:0 10px calc(18px + var(--safe-bottom));background:#fffaf7}
.wheel-sheet-head{height:53px;grid-template-columns:78px minmax(0,1fr) 78px;border-bottom:1px solid #eadfd8}
.wheel-sheet-head strong{font-size:12px}
.wheel-sheet-head button{font-size:10.5px;padding:10px 4px}
.wheel-picker{--row-height:44px;height:220px}
.wheel-picker:before,.wheel-picker:after{height:88px}
.wheel-selection{top:88px;height:44px;border-radius:7px;background:#ece7e3}
.wheel-column{height:220px;padding:0 2px}
.wheel-pad{height:88px;flex-basis:88px}
.wheel-value{height:44px;font-size:15px;color:#aaa09a}
.wheel-value.selected{font-size:17px;color:#221d1a;font-weight:500}

/* Breeding */
.breeding-page{padding-top:0}
.breeding-page .segment-row{margin:0 -9px 7px;background:#fffdfb;height:39px}
.breeding-page .segment{padding:10px 5px 8px;font-size:8.5px}
.breed-empty{padding-top:112px}
.breed-empty .pink-art{color:#eea8c4}.breed-empty .heart-art{width:55px;height:55px}
.breed-empty .pink-guide{border-color:#db6d98;color:#b63367}

/* Tasks */
.tasks-page{padding-top:10px}
.task-mode-switch{margin:0 auto 10px}
.task-mode-switch .pill-switch button{min-width:78px}
.calendar-head{padding:5px 0}.calendar-head strong{font-size:11px}
.calendar-grid{gap:2px}.cal-day-name{font-size:7px}.cal-cell{min-height:43px;border-radius:4px;font-size:7px}
.task-row{grid-template-columns:22px 1fr 27px;gap:6px}.task-check{width:19px;height:19px}.task-row .card-title{font-size:10px!important}

/* Output */
.output-card{border-radius:7px;padding:10px;margin-bottom:8px;box-shadow:none}
.output-card-head{gap:7px;margin-bottom:5px}.out-icon{width:25px;height:25px;border-radius:5px}.out-icon svg{width:14px;height:14px}
.output-card h3{font-size:10px}.output-card p{font-size:7.5px;line-height:1.5;margin-bottom:7px}.output-card .btn{min-height:32px;font-size:8.5px;border-radius:5px}

/* My page and settings */
.page-heading{padding:9px 2px 6px}.page-heading h2{font-size:12px}
.profile-card{padding:8px 5px 8px}.profile-avatar{width:51px;height:51px;margin-bottom:6px}.profile-card h2{font-size:12px}.profile-card p{font-size:7.5px}.profile-card .btn{min-height:32px;font-size:8.5px}
.premium-card{padding:9px;border-radius:7px;margin:6px 0 8px}.premium-card strong{font-size:9px}.premium-card small{font-size:7px}
.record-card{padding:10px;border-radius:7px}.record-card strong{font-size:10px}.record-card small{font-size:7px}
.section-title{font-size:10px;margin:13px 2px 7px}.room-stat{padding:8px;border-radius:7px}.room-stat-icon{width:28px;height:28px}.room-stat strong{font-size:9px}.room-stat small{font-size:7px}.room-stat .room-count{font-size:15px}
.settings-section-label{font-size:7.5px;margin:12px 3px 5px}
.list-group{border-radius:7px;margin-bottom:9px;box-shadow:none}.list-row{min-height:45px;padding:8px 9px;gap:8px}.list-row .row-icon{width:25px;height:25px;border-radius:5px}.list-row .row-main strong{font-size:9px}.list-row .row-main small{font-size:7px}
.ios-switch{width:35px;height:21px}.ios-switch span:after{width:17px;height:17px}.ios-switch input:checked+span:after{transform:translateX(14px)}

/* Manual */
.manual-tip{font-size:7.5px;padding:8px;border-radius:7px}.manual-section{padding:9px;border-radius:7px;margin:6px 0}.manual-section h3{font-size:9px}.manual-section p,.manual-section li{font-size:7.3px;line-height:1.58}

/* Welcome */
.welcome-card h2{font-size:14px;margin:0 0 7px}.welcome-card>p{font-size:8.5px;line-height:1.55;color:#71645d;margin:0 0 10px}
.welcome-step{display:grid;grid-template-columns:25px 1fr;gap:8px;align-items:start;padding:7px 0;border-top:1px solid #eee4dd}.welcome-step b{width:22px;height:22px;border-radius:50%;background:#efe2d8;color:#704029;display:grid;place-items:center;font-size:9px}.welcome-step strong{display:block;font-size:9px}.welcome-step small{display:block;font-size:7.2px;line-height:1.45;color:#81746c;margin-top:2px}.welcome-note{font-size:7.5px;line-height:1.55;padding:8px;border-radius:6px;background:#f3e7dc;color:#6c5142;margin:6px 0 10px}.welcome-actions{display:grid;grid-template-columns:72px 1fr;gap:7px}.welcome-actions .btn{min-height:34px;font-size:8.5px}

/* Detail */
.detail-page{padding:13px 15px 35px;max-width:520px}
.app-header.detail-mode{height:calc(48px + var(--safe-top));grid-template-columns:36px minmax(55px,1fr) 211px;padding-left:7px;padding-right:4px}
.app-header.detail-mode h1{font-size:13px}
.header-button.detail-actions{width:211px;height:39px;gap:0}
.header-button.detail-actions>span{width:39px;height:38px;font-size:22px}
.header-button.detail-actions>span svg{width:17px;height:17px}
.header-button.detail-actions .detail-favorite{font-size:24px}
.specimen-summary{grid-template-columns:65px minmax(0,1fr);gap:13px;align-items:center}
.specimen-photo{width:65px;height:65px;border-radius:14px;font-size:26px}
.specimen-photo>span{width:21px;height:21px;border-radius:6px}
.specimen-copy h2{font-size:16px;line-height:1.2;margin-bottom:2px}
.specimen-copy em{font-size:10px;margin-bottom:4px}
.specimen-badges{gap:6px;margin:1px 0 5px}.tag{font-size:8px;padding:3px 7px;border-radius:4px}.specimen-final{gap:5px}.specimen-final>b{font-size:10px}.sex-pill{font-size:8px;padding:3px 8px}
.ancestry-button{height:49px;border-radius:10px;margin:15px 0 23px;font-size:12px}
.timeline-section{margin-bottom:20px}.detail-section-head{margin-bottom:10px}.detail-section-head h3{font-size:14px}.detail-section-head>span{font-size:7.5px}
.growth-timeline{height:91px;border-radius:11px;padding:11px 6px 8px}.growth-timeline:before{top:40px;height:4px}.timeline-node{gap:7px}.timeline-node i{width:28px;height:28px;border-width:6px}.timeline-node span{font-size:7.5px}.timeline-node.current i{width:32px;height:32px}
.temperature-row{height:38px;border-radius:8px;padding:0 10px;margin-bottom:8px}.temperature-row strong{font-size:9.5px}
.maturity-card{border-radius:20px;padding:18px 20px;margin-bottom:21px}.maturity-head{margin-bottom:13px}.maturity-head h3{font-size:12px}.maturity-head>span{font-size:8px}
.eclosion-box{min-height:62px;border-radius:10px;grid-template-columns:30px 1fr;padding:9px 11px;margin-bottom:14px}.eclosion-box strong{font-size:10px}.eclosion-box b{font-size:9.5px;margin-top:3px}.feeding-start-button{min-height:48px;border-radius:8px;font-size:11px}
.feeding-start-row{font-size:9px}.daily-label{font-size:8px}.jelly-row strong{font-size:9px}.jelly-row small{font-size:7.5px}.jelly-row button{font-size:8.5px;padding:8px 10px}
.detail-size-section>label{font-size:8px}.size-confirm-row{grid-template-columns:1fr 67px;gap:8px}.size-confirm-row input{height:43px;border-radius:8px;font-size:10px}.size-confirm-row button{font-size:11px;border-radius:8px}.free-size-button{height:39px;font-size:9.5px;border-radius:8px}.detail-toggle-label{font-size:8px;margin-top:20px}.detail-toggle button{height:32px;font-size:9px}.trade-status-card{padding:10px 11px;border-radius:8px}.trade-status-card label{font-size:8.5px}.trade-status-card select{height:35px;font-size:9px}.trade-status-card p{font-size:7px}.finish-breeding{height:39px;font-size:9px;border-radius:8px;margin-bottom:20px}
.history-section{padding-top:13px}.history-row{padding:9px}.history-row strong{font-size:9px}.history-row small{font-size:7px}.history-row p{font-size:7.5px}

/* Generic modal */
.overlay{background:rgba(24,20,18,.55)}
.modal{border-radius:17px 17px 0 0;padding:15px 14px calc(15px + var(--safe-bottom));max-width:520px}
.modal.center{border-radius:11px;padding:16px 15px;max-width:330px}
.modal h2{font-size:13px;margin:0 0 10px}.modal-close{font-size:20px}
.option-title{font-size:12px!important}.option-row{min-height:41px;padding:0 12px;font-size:10px}.option-list{border-radius:8px}
.toast{font-size:9px;border-radius:7px;padding:8px 11px}

@media (max-width:374px){
  .form-page,.detail-page{padding-left:11px;padding-right:11px}
  .app-header.detail-mode{grid-template-columns:34px minmax(48px,1fr) 198px}.header-button.detail-actions{width:198px}.header-button.detail-actions>span{width:37px}
  .specimen-summary{grid-template-columns:60px 1fr;gap:10px}.specimen-photo{width:60px;height:60px}.specimen-copy h2{font-size:14px}
  .filter-main{padding-left:6px;padding-right:6px}
}
