/* ==== 共通パネル（見出しが上枠に乗るボックス）: _tools/themes.py で生成。色は .t-*、アイコンは .i-* で切替 ==== */
:root{--pc:#36946a;--pt:#1e6b47;--sab:env(safe-area-inset-bottom,0px);--sat:env(safe-area-inset-top,0px)}
body{background:#fff}
.panel{--icon:var(--app-icon);position:relative;max-width:100%;margin:24px 0 14px;padding:0 14px 12px;border:2px solid var(--pc);border-radius:6px;background:#fff;color:#333}
.panel-title{display:inline-flex;align-items:center;column-gap:5px;position:relative;top:-13px;margin:0 0 -8px -6px;padding:0 8px;background:#fff;color:var(--pt);font-size:1rem;font-weight:700;line-height:1.5;vertical-align:top}
.panel-title::before{content:'';flex:none;width:22px;height:22px;background:var(--pt);-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
.panel-title .count{color:#5f6670;font-weight:400;font-size:.8rem}
.panel > p{margin:0 0 .6em}
:root{--app-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M18.36 17.36L12 23.73l-6.36-6.37a9 9 0 1 1 12.72 0zM12 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'/%3E%3C/svg%3E")}
.t-navy{--pc:#3f78b5;--pt:#0b4a85}
.t-teal{--pc:#2a9d8f;--pt:#0f6b61}
.t-sky{--pc:#4a90d9;--pt:#1a5fb4}
.t-red{--pc:#e06666;--pt:#b3261e}
.t-subway{--pc:#0079C2;--pt:#0079C2}
.t-green{--pc:#36946a;--pt:#1e6b47}
.t-rose{--pc:#d0587f;--pt:#a3284f}
.t-gray{--pc:#868e96;--pt:#4d5660}
.t-purple{--pc:#9a80dd;--pt:#5a3fa8}
.t-indigo{--pc:#7986cb;--pt:#3949ab}
.i-pen{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12.9 6.85l4.24 4.25-9.9 9.9H3v-4.25l9.9-9.9zm1.41-1.41l2.12-2.12a1 1 0 0 1 1.42 0l2.83 2.83a1 1 0 0 1 0 1.41l-2.12 2.12-4.25-4.24z'/%3E%3C/svg%3E")}
.i-pin{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M18.36 17.36L12 23.73l-6.36-6.37a9 9 0 1 1 12.72 0zM12 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'/%3E%3C/svg%3E")}
.i-train{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8 2h8a4 4 0 0 1 4 4v9a3 3 0 0 1-2.2 2.9L20 21h-2.6l-1.8-3H8.4l-1.8 3H4l2.2-3.1A3 3 0 0 1 4 15V6a4 4 0 0 1 4-4zM6 7v4h12V7H6zm2.5 6a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm7 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z'/%3E%3C/svg%3E")}
.i-cloud{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M7 20a5 5 0 0 1-.9-9.92A6.5 6.5 0 0 1 18.4 8.6 5.7 5.7 0 0 1 17.5 20H7z'/%3E%3C/svg%3E")}
.i-sun{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 7a5 5 0 1 1 0 10 5 5 0 0 1 0-10zM11 1h2v3h-2zm0 19h2v3h-2zM1 11h3v2H1zm19 0h3v2h-3zM4.2 5.6l1.4-1.4 2.1 2.1-1.4 1.4zm12.1 12.1l1.4-1.4 2.1 2.1-1.4 1.4zM4.2 18.4l2.1-2.1 1.4 1.4-2.1 2.1zM16.3 6.3l2.1-2.1 1.4 1.4-2.1 2.1z'/%3E%3C/svg%3E")}
.i-warn{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2L1 21h22L12 2zm-1 7h2v6h-2V9zm0 8h2v2h-2v-2z'/%3E%3C/svg%3E")}
.i-shirt{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3L3 6l2 4.2 2-1V21h10V9.2l2 1L21 6l-5.5-3a3.5 3.5 0 0 1-7 0z'/%3E%3C/svg%3E")}
.i-bulb{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M9 20h6v2H9v-2zm3-18a7 7 0 0 1 4 12.75V18H8v-3.25A7 7 0 0 1 12 2z'/%3E%3C/svg%3E")}
.i-star{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2l3.1 6.6 7.2.8-5.4 4.9 1.5 7.1L12 17.8l-6.4 3.6 1.5-7.1L1.7 9.4l7.2-.8z'/%3E%3C/svg%3E")}
.i-flame{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1.5c1.2 4.2 6.5 6.4 6.5 12.5a6.5 6.5 0 0 1-13 0c0-3.2 1.8-5.6 3.3-6.8-.1 2.3.8 3.8 2.2 4.3-.4-3.6.1-6.9 1-10z'/%3E%3C/svg%3E")}
.i-save{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M4 3h12l5 5v13H3V3h1zm3 1v5h8V4H7zm5 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E")}
.i-list{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M4 5h2.5v2.5H4zm5 0h11v2.5H9zM4 10.75h2.5v2.5H4zm5 0h11v2.5H9zM4 16.5h2.5V19H4zm5 0h11V19H9z'/%3E%3C/svg%3E")}
.i-check{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E")}
/* ==== 共通パネルここまで ==== */
:root{--bg:#f4f7f4;--card:#fff;--ink:#1f2a24;--muted:#6b776f;--pri:#2e7d5b;--bad:#c0392b}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans CJK JP","Noto Sans JP",sans-serif;color:var(--ink);line-height:1.55;-webkit-text-size-adjust:100%;padding-bottom:var(--sab)}
header{background:var(--pri);color:#fff;padding:calc(14px + env(safe-area-inset-top)) 16px 14px}
h1{margin:0;font-size:1.3rem}.sub{margin:2px 0 0;font-size:.82rem;opacity:.9}
main{padding:12px;max-width:640px;margin:0 auto}
.row{display:flex;gap:8px;align-items:center}.between{justify-content:space-between}.wrap{flex-wrap:wrap;margin-top:6px}
.btn{border:0;border-radius:10px;background:var(--pri);color:#fff;padding:10px 14px;font-size:.95rem;font-weight:700;cursor:pointer;display:inline-block}
.btn.small{padding:6px 10px;font-size:.85rem}.btn.ghost{background:#e8f1ec;color:var(--pri)}.btn.danger{background:#fdecea;color:var(--bad)}
.btn:disabled{opacity:.6}
.linkbtn{border:0;background:none;color:var(--pri);text-decoration:underline;padding:0;font:inherit}
.small{font-size:.82rem}.muted{color:var(--muted)}.ng{color:var(--bad)}
.filters{display:flex;gap:6px;overflow-x:auto;padding:8px 0 4px;-webkit-overflow-scrolling:touch}
.pill{flex:none;border:1px solid #cfdcd4;background:#fff;border-radius:999px;padding:4px 10px;font-size:.82rem;color:var(--ink)}
.pill.on{background:var(--pri);color:#fff;border-color:var(--pri)}
.list{list-style:none;margin:0;padding:0}
.item{display:flex;gap:8px;align-items:flex-start;padding:10px 0;border-top:1px solid #edf1ee}
.item-main{flex:1;min-width:0}.memo{color:#3b4a41;white-space:pre-wrap;word-break:break-word}
.badges{display:inline-flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.tag{font-size:.72rem;padding:1px 7px;border-radius:999px;background:#eef1ef;color:#3b4a41}
.tag.indoor{background:#e3effd;color:#1a5fb4}.tag.outdoor{background:#e6f6e6;color:#26734d}.tag.both{background:#f1ecfb;color:#6a3fb5}
.s-spring{background:#fde7ef;color:#b0325f}.s-summer{background:#e0f6f9;color:#0f6e7b}.s-autumn{background:#fdf0e1;color:#a95a0b}.s-winter{background:#e8eefc;color:#2d4aa8}
.tag.plain{background:#f5f5f5}.tag.done{background:#ddd;color:#555}
.suggestions{margin:8px 0 0;padding-left:1.3em}.suggestions li{margin:6px 0}
#weather{margin-top:6px}
footer{font-size:.72rem;color:var(--muted);text-align:center;padding:8px 16px 20px}
[hidden]{display:none!important}
.btn.wide{width:100%;margin-top:4px;padding:12px}
/* ---- 追加・編集シート: 全画面 100dvh、固定要素で入力欄を覆わない。保存ボタンはセーフエリアの上 ---- */
html.locked,html.locked body{overflow:hidden;overscroll-behavior:none}
.sheet{position:fixed;left:0;right:0;top:0;height:100vh;height:100dvh;z-index:50;background:#fff;display:flex;flex-direction:column}
.sheet[hidden]{display:none!important}
.sheet-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:calc(6px + var(--sat)) 8px 6px;border-bottom:1px solid #e1e8e3;background:#fff}
.sheet-head h2{margin:0;font-size:1.05rem;color:var(--pt)}
.iconbtn{width:44px;height:44px;border:0;background:none;font-size:1.3rem;color:var(--ink);border-radius:10px}
.sheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:12px 16px 24px;scroll-padding:16px}
.sheet-foot{flex:none;display:flex;gap:10px;padding:10px 16px calc(10px + var(--sab));border-top:1px solid #e1e8e3;background:#fff}
.sheet-foot .btn{flex:1;min-height:48px;font-size:1rem}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.search input{width:100%;font-size:17px;padding:12px 14px;min-height:50px;border:2px solid var(--pc);border-radius:12px;font-family:inherit;background:#fff;-webkit-appearance:none;appearance:none}
.search input:focus{outline:3px solid #b9e0cb;outline-offset:0}
#hits-note{margin:8px 2px}
.hits{list-style:none;margin:0;padding:0}
.hit{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;column-gap:10px;width:100%;text-align:left;border:0;border-bottom:1px solid #e6eee9;background:none;padding:12px 4px;min-height:56px;font:inherit;color:var(--ink)}
.hit b{grid-column:1}.hit span{grid-column:1;font-size:.8rem;color:var(--muted)}
.hit i{grid-column:2;grid-row:1/3;align-self:center;font-style:normal;font-weight:700;font-size:.85rem;color:#fff;background:var(--pri);border-radius:999px;padding:6px 12px}
.hit.have i{background:#e1e8e3;color:#3b4a41}
.hit:active{background:#eaf5ef}
.nohit{padding:12px 4px}
.more{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.more .btn{min-height:46px}
.added{display:flex;flex-direction:column;gap:8px;margin:10px 0 0;padding:10px 12px;border-radius:10px;background:#e7f4ec;color:#1e5a3d;font-size:.95rem}
.added .row{flex-wrap:wrap}
#form{display:flex;flex-direction:column;gap:14px}
#form label{display:flex;flex-direction:column;font-size:.9rem;gap:4px;font-weight:700;color:#33443a}
#form input:not([type=checkbox]):not([type=radio]),#form textarea{font-size:16px;padding:10px 12px;min-height:46px;border:1px solid #b8c9bf;border-radius:10px;font-family:inherit;font-weight:400;background:#fff}
#form [aria-invalid=true]{border-color:var(--bad)}
fieldset{border:0;margin:0;padding:0}
legend{font-size:.9rem;font-weight:700;color:#33443a;padding:0;margin-bottom:6px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
#form label.chip{flex-direction:row;font-weight:400;position:relative}
.chip input{position:absolute;opacity:0;width:1px;height:1px}
.chip span{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border:1px solid #b8c9bf;border-radius:999px;font-size:1rem;background:#fff}
.chip input:checked+span{background:var(--pri);border-color:var(--pri);color:#fff;font-weight:700}
.chip input:focus-visible+span{outline:3px solid #b9e0cb}
.chip.wide span{width:100%}
#del-btn{margin-top:8px}
.item .tag.done{align-self:center}
.suggestions .tadd{margin-left:4px}
