:root{--bg:#f8f2e7;--ink:#261f18;--muted:#6d6258;--line:#dfd1bf;--paper:#fffaf2;--paper2:#fff3dd;--s:#466f8c;--v:#a85e49;--o:#487d5f;--c:#7563a8;--m:#8b7047;--shadow:0 8px 18px rgba(50,37,24,.08)}*{box-sizing:border-box}body{margin:0;min-height:100dvh;font-family:"Hiragino Sans","Yu Gothic",Meiryo,sans-serif;color:var(--ink);background:linear-gradient(180deg,#fffaf2,var(--bg))}button{font:inherit}a{color:inherit;text-decoration:none}.app{width:min(390px,100%);margin:0 auto;padding:8px 8px 18px}.top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 0 6px}.back{font-size:10px;font-weight:700;color:var(--muted);padding:6px 8px;border:1px solid var(--line);border-radius:999px;background:#fff}.label{font-size:10px;font-weight:800;color:var(--m)}h1{margin:0;font-size:17px;line-height:1.16;letter-spacing:-.03em;font-weight:720}.card{background:var(--paper);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow)}.hero{padding:9px 10px;margin-bottom:7px}.heroRow{display:flex;align-items:center;justify-content:space-between;gap:8px}.sentenceBox{padding:10px;margin-bottom:7px}.sentenceLabel{font-size:10px;font-weight:800;color:var(--muted);margin-bottom:5px}.sentence{display:flex;flex-wrap:wrap;gap:3px 5px;align-items:baseline;font-size:15px;line-height:1.58;font-weight:520;min-height:45px}.word{display:inline-block;padding:0 1px;border-radius:4px;will-change:transform;font-size:15px;line-height:1.58;font-weight:520}.word.in-target{font-size:11px;line-height:1.42;font-weight:600;background:#fff2db;padding:1px 2px}.source-gap{display:inline-block;width:12px;height:16px;border-radius:4px;background:rgba(223,209,191,.22)}.translation{margin-top:5px;color:var(--muted);font-size:10.5px;line-height:1.45}.controls{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:6px;margin:7px 0}.btn{min-height:34px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-weight:700;font-size:11px}.btn.main{background:#312920;color:#fff;border-color:#312920}.btn:disabled{opacity:.43}.tree{position:relative;display:grid;gap:5px;padding:8px;margin-top:7px;min-height:222px;overflow:visible}.tree.prep .node{opacity:1;transform:none}.node{position:relative;border:1px solid var(--line);background:rgba(255,255,255,.86);border-radius:12px;padding:6px 7px 6px 8px;opacity:0;transform:translateY(5px);transition:opacity .55s ease,transform .65s cubic-bezier(.18,.82,.2,1)}.tree.show .node{opacity:1;transform:translateY(0)}.node.depth0{background:#fff6e7;padding:5px 7px}.node.depth1{margin-left:0}.node.depth2{margin-left:13px;background:#fff}.node.depth3{margin-left:24px}.node.modifier{border-left:3px solid var(--m)}.node.S{border-left:3px solid var(--s)}.node.V,.node.VP{border-left:3px solid var(--v)}.node.O,.node.realObject{border-left:3px solid var(--o)}.node.C{border-left:3px solid var(--c)}.node.sentence{border-left:3px solid #312920}.nodeHead{display:flex;justify-content:space-between;gap:5px;align-items:flex-start}.nodeTitle{font-size:11px;font-weight:700;line-height:1.25}.role{flex:0 0 auto;font-size:8px;font-weight:700;padding:1px 5px;border-radius:999px;color:#fff;background:#312920}.role-S{background:var(--s)}.role-V,.role-VP{background:var(--v)}.role-O,.role-realObject{background:var(--o)}.role-C{background:var(--c)}.role-modifier{background:var(--m)}.nodeWords{display:flex;flex-wrap:wrap;gap:2px;margin-top:4px;min-height:18px}.targetSlot{display:inline-flex;min-width:12px;min-height:17px;border-radius:4px;background:rgba(255,242,219,.5);align-items:center}.modifies{margin-top:3px;color:#7b551f;font-size:9.5px;font-weight:700}.nodeDetails{margin-top:3px}.nodeDetails summary{width:max-content;cursor:pointer;list-style:none;color:var(--muted);font-size:9.5px;font-weight:700;padding:2px 0}.nodeDetails summary::-webkit-details-marker{display:none}.nodeDetails summary::after{content:" ＋"}.nodeDetails[open] summary::after{content:" －"}.nodeNote{color:var(--muted);font-size:10px;line-height:1.45;font-weight:450;padding-top:2px}.branch{position:absolute;left:-8px;top:-6px;width:7px;height:22px;border-left:1px solid #d4c0aa;border-bottom:1px solid #d4c0aa;border-bottom-left-radius:6px}@media(max-width:360px){.app{padding:7px 6px 16px}.sentence{font-size:14px}.word{font-size:14px}.word.in-target{font-size:10.5px}.controls{grid-template-columns:1fr}.nodeTitle{font-size:10.5px}}
