/* Sharing stays outside the compact calculator layout. */
.share-entry{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;font-family:inherit;font-size:11px;cursor:pointer}
.share-fallback-backdrop{position:fixed;inset:0;background:#30232080;z-index:10000}
.share-fallback-backdrop[hidden]{display:none}
.share-dialog{position:fixed;inset:0;margin:auto;padding:24px;width:min(760px,calc(100vw - 28px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;border:1px solid #e9d7cf;border-radius:18px;background:#fffaf7;color:#5c4840;box-shadow:0 24px 80px #39221933;font-family:inherit;z-index:10001}
.share-dialog:not([open]){display:none}
.share-dialog::backdrop{background:#30232080;backdrop-filter:blur(3px)}
.share-dialog *{box-sizing:border-box}
.share-dialog button,.share-dialog input{font-family:inherit}
.share-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.share-dialog h2{font-size:21px;line-height:1.4;margin:0;color:#533e36}
.share-dialog-header p{font-size:12px;line-height:1.7;color:#927b6f;margin:5px 0 0}
.share-close{flex:none;width:36px;height:36px;border:1px solid #ecdcd4;background:#fffaf7;border-radius:50%;font-size:25px;line-height:1;color:#8a7065;cursor:pointer}
.share-kind-switch{display:flex;gap:5px;background:#f4eae4;border-radius:10px;padding:4px;margin:19px 0}
.share-kind-switch button{flex:1;min-width:0;border:0;background:none;border-radius:7px;color:#93776a;font-size:12px;padding:10px;cursor:pointer}
.share-kind-switch button[aria-pressed=true]{background:#fffdfb;color:#b96558;box-shadow:0 1px 4px #785b4212}
.share-kind-switch button:disabled{opacity:.45;cursor:default}
.share-dialog-body{display:grid;grid-template-columns:minmax(0,280px) minmax(0,1fr);gap:25px;align-items:start}
.share-image-area{text-align:center;min-width:0}
.share-image-area img{display:block;width:100%;height:auto;border-radius:11px;border:1px solid #ebdcd2;background:#fff;user-select:auto;-webkit-touch-callout:default;box-shadow:0 5px 20px #6c45300a}
.share-image-area p{font-size:10px;color:#a08473;line-height:1.5;margin:9px 0 0}
.share-tools{min-width:0}
.share-tools h3{font-size:17px;line-height:1.6;overflow-wrap:anywhere;margin:0 0 5px;color:#5c4336}
.share-tools>p{font-size:11px;color:#9d8272;line-height:1.8;margin:0 0 15px}
.share-link-manual>label{display:block;font-size:10px;color:#9d8272;margin:0 0 6px}
.share-link-manual>input{width:100%;min-width:0;border:1px solid #e5d6cd;border-radius:7px;background:#fffefb;color:#795947;font-size:11px;line-height:1.5;padding:11px 9px;user-select:text}
.share-link-manual[hidden]{display:none}
.share-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0 0}
.share-action-grid button{border:1px solid #e3c6b9;border-radius:8px;padding:11px 5px;background:#fff8f2;color:#a16852;font-size:12px;cursor:pointer;min-width:0}
.share-action-grid .share-primary{background:#bd7465;border-color:#bd7465;color:#fff}
.share-action-grid #nativeShareLink{grid-column:1/-1}
.share-action-grid button:hover{filter:brightness(.97)}
.share-action-grid button:disabled{opacity:.5;cursor:wait}
.share-tools>.share-feedback{min-height:34px;font-size:11px;color:#a66a51;margin:9px 0;line-height:1.6}
.save-guide{border-top:1px solid #ecded5;border-bottom:1px solid #ecded5;padding:11px 0}
.save-guide summary{font-size:12px;line-height:1.6;color:#8f6f5d;cursor:pointer}
.save-guide>div{font-size:11px;line-height:1.8;color:#9b7e6a;margin-top:12px}
.save-guide b{font-weight:600;color:#81604e}
.save-guide p{margin:3px 0 0}
.share-tools>.share-note{font-size:9px;line-height:1.8;color:#ac9283;margin:12px 0 0}
@media(max-width:750px){.share-entry.header-button{border-radius:7px;width:auto;min-width:44px;height:34px;padding:0 8px;font-size:11px}.share-entry>span[aria-hidden]{display:none}.share-entry-label{display:inline}.top-actions{gap:6px}}
@media(max-width:590px){
 .share-dialog{width:calc(100vw - 20px);padding:18px 16px;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);border-radius:14px}
 .share-dialog h2{font-size:19px}.share-dialog-header p{font-size:11px}
 .share-kind-switch{margin:15px 0}
 .share-dialog-body{grid-template-columns:minmax(0,1fr);gap:16px}
 .share-image-area{width:min(210px,100%);margin:auto}
 .share-tools h3{font-size:15px}.share-tools>p{margin-bottom:11px}
 .share-tools>.share-feedback{min-height:18px;margin:8px 0}
 .share-action-grid button{min-height:41px}
}
@media(max-height:520px) and (min-width:591px){.share-dialog{padding:16px}.share-image-area{width:190px;margin:auto}.share-dialog-body{grid-template-columns:minmax(0,210px) minmax(0,1fr)}}
