/* 认真体 — 自由画布（canvas.html）
 * 和网站同一套纸：墨色小字、手画的框和圈、一顿一顿的动效。电脑上是一整屏的工具（左边加东西、中间是纸、右边是设置），
 * 手机上纸粘在顶上，下面是加东西和设置，往下滑着改、抬头就能看见纸。 */
.studio { --box-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 48' preserveAspectRatio='none'%3E%3Cpath d='M7 8.5 C46 4.5 128 6.2 193.5 4.8 C196.4 17 195.6 31 195.2 42.6 C140 44.6 62 43.4 5.4 44.8 C3.6 33 3.2 20.6 7 8.5 Z' fill='%23fbfaf6' stroke='%231d1b18' stroke-width='1.6' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); --frame-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M3.2 2.6 C30 1.6 68 2.4 97.2 1.9 C98.2 30 97.6 66 98.1 97.4 C70 98.3 31 97.6 2.4 98.2 C1.7 68 2.3 31 3.2 2.6 Z' fill='%23fbfaf6' stroke='%231d1b18' stroke-width='1.6' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); position: relative; margin-top: 66px; height: calc(100vh - 66px); height: calc(100svh - 66px); min-height: 560px; display: grid; grid-template-rows: auto minmax(0, 1fr); }

/* ---------- 顶上一行 ---------- */
.st-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; padding: 6px clamp(16px, 2.4vw, 32px) 8px; border-bottom: 1px solid var(--line); min-height: 70px; }
.st-top .back { margin: 0; }
.st-title { min-height: 40px; }
.st-size { font: 500 12px/1 "Jost", var(--sans); letter-spacing: .12em; padding-top: 6px; white-space: nowrap; }
.st-acts { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.st-act { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 6px; font-size: 12.5px; letter-spacing: .14em; cursor: pointer; color: var(--ink); transition: transform .2s steps(3); white-space: nowrap; }
.st-act svg { width: 18px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.st-act:hover:not(:disabled) { transform: rotate(-2deg); }
.st-act:disabled { opacity: .3; cursor: default; }
#stPlay { width: 10.6em; text-align: center; }   /* 「写一遍给我看」和「停」一样宽：旁边的撤销、重做不会跳 */
#stPlay.on { background-image: var(--box-fill); color: var(--paper); }
.st-exwrap { position: relative; }
#stSave { min-width: 7em; }

/* ---------- 弹出来的小单子：存下来、选插画、选记号（和「今天谁值日」一样的手画框） ---------- */
.st-menu { position: absolute; z-index: 30; padding: 14px 18px 10px; background: var(--frame-paper) center / 100% 100% no-repeat; opacity: 0; transform: translateY(-4px); transition: opacity .2s steps(3), transform .2s steps(3); }
.st-menu.on { opacity: 1; transform: none; }
.st-menu[hidden] { display: none; }
.st-menu-t { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 4px 2px; font-size: 11px; font-weight: 500; letter-spacing: .26em; }
.st-close { display: none; border: 0; background: var(--uline) 0 100% / 100% 5px no-repeat; padding: 2px 0 5px; font-size: 12.5px; font-weight: 400; letter-spacing: .14em; cursor: pointer; color: var(--ink); }
.st-ex { top: calc(100% + 10px); right: -8px; width: 300px; }
.st-ex .ex { width: 100%; padding: 11px 0 12px; }
.st-ex .ex:last-child { border-bottom: 0; }
.st-ex .ex b { font-size: 15px; }
.st-ex .ex span { font-size: 12px; }
.st-pick { left: 96px; top: 14px; width: 318px; transform: translateX(-4px); }
.st-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.st-grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; padding: 8px 2px 6px; cursor: pointer; font-size: 12px; letter-spacing: .08em; color: var(--ink); transition: transform .2s steps(3); }
.st-grid button:hover, .st-grid button:focus-visible { transform: rotate(-2deg); }
.st-grid button:hover span, .st-grid button:focus-visible span { background: var(--uline) 0 100% / 100% 5px no-repeat; }
.st-grid button span { padding-bottom: 3px; }
.st-grid canvas { width: 78px; height: 64px; }
.st-grid.marks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.st-grid.marks canvas { width: 64px; height: 44px; }

/* ---------- 三栏：加东西 | 纸 | 设置 ---------- */
.st-main { position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr) 340px; min-height: 0; }
.st-rail { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; border-right: 1px solid var(--line); overflow-y: auto; }
.st-add { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 10px 2px 9px; cursor: pointer; color: var(--ink); font-size: 12px; letter-spacing: .1em; transition: transform .2s steps(3); }
.st-add canvas { width: 34px; height: 34px; }
.st-add .ico-print { display: grid; place-items: center; width: 34px; height: 34px; font: 500 23px/1 var(--zh); letter-spacing: 0; }
.st-add:hover { transform: rotate(-3deg); }
.st-add[aria-expanded="true"], .st-add[aria-pressed="true"] { background: var(--ring) 50% 6px / 50px 44px no-repeat; }

.st-stage { position: relative; overflow: hidden; background: var(--paper-2); touch-action: none; outline: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.st-stage:focus-visible:not(.by-pointer) { box-shadow: inset 0 0 0 1.5px rgba(141, 179, 58, .65); }
.st-stage:focus-visible { outline: none; }
.st-stage.drop { box-shadow: inset 0 0 0 3px var(--green); }
#stCv { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 拿着画笔、橡皮：十字（再跟着鼠标画一个笔头大小的圈） */
.st-stage.pen-mode, .st-stage.erase-mode { cursor: crosshair; }
/* 在纸上改字：看不见的输入框跟着光标走（输入法的候选字出在光标旁边）。16px：iPhone 上小于 16 会自动放大页面 */
.st-edit { position: absolute; left: 0; top: 0; z-index: 1; width: 2px; height: 20px; margin: 0; padding: 0; border: 0; outline: none; resize: none; overflow: hidden; white-space: pre; font: 16px/1 var(--zh); color: transparent; background: transparent; caret-color: transparent; opacity: 0; pointer-events: none; -webkit-user-select: text; user-select: text; }
/* 输入法正在打的拼音：一个小纸条跟在光标下面 */
.st-ime { position: absolute; left: 0; top: 0; z-index: 6; margin: 0; padding: 4px 10px 6px; background: var(--box-paper) center / 100% 100% no-repeat; font: 400 15px/1.3 var(--zh); letter-spacing: .04em; white-space: pre; pointer-events: none; max-width: 70%; overflow: hidden; text-overflow: ellipsis; }
.st-ime[hidden] { display: none; }
/* 空白的纸、上一张还在：点一下接着改 */
.st-resume { position: absolute; left: 50%; top: calc(50% + 6px); transform: translateX(-50%); z-index: 3; border: 0; padding: 9px 18px 10px; background: var(--box-paper) center / 100% 100% no-repeat; font-size: 13px; letter-spacing: .14em; color: var(--ink); cursor: pointer; transition: transform .2s steps(3); }
.st-resume:hover { transform: translateX(-50%) rotate(-2deg); }
.st-resume[hidden] { display: none; }

/* 选中框：一圈虚线；四个角拉大小，左右两边拉换行宽度（记号还有上下），上面的小圆转角度 */
/* 虚线下面垫一圈纸色：深色的纸、照片上也看得见 */
.st-sel { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; outline: 1.5px dashed rgba(29, 27, 24, .8); box-shadow: 0 0 0 1.5px rgba(253, 252, 249, .85); }
.st-sel[hidden], .st-stage.playing .st-sel { display: none; }
.st-sel .h { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: auto; touch-action: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M11.5 2.2 C6 1.4 2.2 5.4 2.6 10.4 C3 15.2 6.6 18 11 17.6 C15.6 17.2 18 13.6 17.4 9.2 C16.9 5.2 14 2.6 9.4 2.8' fill='%23fffefb' stroke='%231d1b18' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.st-sel .h::before { content: ""; position: absolute; inset: -9px; }
.st-sel .nw { left: 0; top: 0; cursor: nwse-resize; }
.st-sel .ne { left: 100%; top: 0; cursor: nesw-resize; }
.st-sel .sw { left: 0; top: 100%; cursor: nesw-resize; }
.st-sel .se { left: 100%; top: 100%; cursor: nwse-resize; }
.st-sel .w, .st-sel .e { top: 50%; width: 8px; height: 20px; margin: -10px 0 0 -4px; background: #fffefb; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--ink); cursor: ew-resize; }
.st-sel .w { left: 0; }
.st-sel .e { left: 100%; }
.st-sel .n, .st-sel .s { left: 50%; width: 20px; height: 8px; margin: -4px 0 0 -10px; background: #fffefb; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--ink); cursor: ns-resize; display: none; }
.st-sel .n { top: 0; }
.st-sel .s { top: 100%; }
.st-sel .rot { left: 50%; top: -34px; width: 16px; height: 16px; margin-left: -8px; cursor: grab; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M11.5 2.2 C6 1.4 2.2 5.4 2.6 10.4 C3 15.2 6.6 18 11 17.6 C15.6 17.2 18 13.6 17.4 9.2 C16.9 5.2 14 2.6 9.4 2.8' fill='%23fffefb' stroke='%231d1b18' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M13.6 7.4 C12.4 5.6 9.6 5 7.8 6.6 C6 8.2 6 11.2 7.8 12.8 C9.4 14.2 12 14 13.4 12.4 M13.8 4.8 L13.7 7.6 L11 7.6' fill='none' stroke='%231d1b18' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.st-sel .rot::after { content: ""; position: absolute; left: 7.25px; top: 16px; width: 1.5px; height: 19px; background: rgba(29, 27, 24, .8); box-shadow: 0 0 0 1px rgba(253, 252, 249, .8); }
.st-sel .rot:active { cursor: grabbing; }
.st-sel[data-type="mark"] .n, .st-sel[data-type="mark"] .s { display: block; }
.st-sel[data-type="art"] .w, .st-sel[data-type="art"] .e, .st-sel[data-type="image"] .w, .st-sel[data-type="image"] .e, .st-sel[data-type="draw"] .w, .st-sel[data-type="draw"] .e { display: none; }
/* 正在纸上改字：框变成实线；框里面点是挪光标、拖是选字，拖框的边才是挪这一块 */
.st-sel.editing { outline-style: solid; outline-color: rgba(29, 27, 24, .5); }
.st-sel .edge { position: absolute; display: none; pointer-events: auto; touch-action: none; cursor: move; }
.st-sel.editing .edge { display: block; }
.st-sel .edge.t { left: -6px; right: -6px; top: -7px; height: 12px; }
.st-sel .edge.b { left: -6px; right: -6px; bottom: -7px; height: 12px; }
.st-sel .edge.l { top: -6px; bottom: -6px; left: -7px; width: 12px; }
.st-sel .edge.r { top: -6px; bottom: -6px; right: -7px; width: 12px; }
.st-stage.dragging .st-sel .h { opacity: .35; }
/* 选中的块在屏幕上太小：边上的拉手收起来，只留四个角和转的那个 */
.st-sel.thin .h.w, .st-sel.thin .h.e, .st-sel.slim .h.n, .st-sel.slim .h.s { display: none; }
/* 锁住的块：选中了只在面板里改，没有拉手，框是点线 */
.st-sel[data-lock] { outline-style: dotted; }
.st-sel[data-lock] .h { display: none; }

.st-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; padding: 3px 8px; background: var(--box-paper) center / 100% 100% no-repeat; }
.st-zoom button { border: 0; background: none; min-width: 28px; height: 28px; padding: 0 4px; font: 500 15px/1 "Jost", var(--sans); cursor: pointer; color: var(--ink); }
.st-zoom #stZoomVal { min-width: 52px; font-size: 12px; letter-spacing: .04em; }
/* 手机上纸角上的撤销、重做（电脑上在顶上一行） */
.st-mini { position: absolute; left: 8px; bottom: 8px; display: none; align-items: center; padding: 3px 6px; background: var(--box-paper) center / 100% 100% no-repeat; }
.st-mini button { border: 0; background: none; width: 34px; height: 30px; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.st-mini button:disabled { opacity: .3; cursor: default; }
.st-mini svg { width: 18px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st-note { position: absolute; left: 50%; top: 12px; margin: 0; padding: 7px 18px 8px; transform: translate(-50%, -4px); background: var(--box-fill) center / 100% 100% no-repeat; color: var(--paper); font-size: 12.5px; letter-spacing: .1em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .25s steps(3), transform .25s steps(3); max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.st-note.on { opacity: 1; transform: translate(-50%, 0); }
.st-tip { position: absolute; left: 12px; bottom: 12px; margin: 0; padding: 6px 12px 7px; background: var(--box-paper) center / 100% 100% no-repeat; font: 500 12px/1 "Jost", var(--sans); letter-spacing: .06em; pointer-events: none; }
.st-tip[hidden] { display: none; }

/* ---------- 设置面板 ---------- */
.st-panel { overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); padding: 16px 24px 48px; }
.st-panel .pg { padding: 14px 0 16px; border-top: 1px dashed var(--line); }
.st-panel .pg > .tool-label { display: block; margin: 0 0 8px; }
.p-hint { margin: 2px 0 14px; font-size: 13px; letter-spacing: .04em; line-height: 1.8; }
.p-note { margin: 6px 0 0; font-size: 12px; letter-spacing: .04em; line-height: 1.7; }
.p-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 0 12px; }
.p-head h2 { margin: 0; font: 500 15px/1.3 var(--zh); letter-spacing: .24em; }
.p-acts { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.tbtn { border: 0; background: var(--uline) 0 100% / 0 5px no-repeat; padding: 4px 5px 6px; font-size: 12.5px; letter-spacing: .1em; cursor: pointer; color: var(--ink); white-space: nowrap; transition: background-size .25s steps(3); }
.tbtn:hover, .tbtn:focus-visible { background-size: 100% 5px; }
.pr { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0; min-height: 34px; }
.pr > .tool-label { min-width: 3.4em; }
.pr.slide { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) 3.8em 1.6em; gap: 10px; cursor: default; }
.pr.slide .unit { margin-left: -6px; }
.st-panel .slide input[type=range] { width: 100%; }
.num { width: 3.8em; min-width: 0; border: 0; border-radius: 0; background: var(--uline) 0 100% / 100% 5px no-repeat; padding: 3px 2px 6px; font: 400 13px/1.2 "Jost", var(--sans); letter-spacing: 0; text-align: right; color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.num::-webkit-inner-spin-button, .num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.unit { font-size: 11.5px; letter-spacing: .04em; white-space: nowrap; }
.st-panel textarea, .st-panel input[type=text] { width: 100%; display: block; min-width: 0; border: 0; border-radius: 0; resize: none; overflow: hidden; background: var(--uline) 0 100% / 100% 6px no-repeat; padding: 5px 2px 9px; font: 400 15px/1.6 var(--zh); letter-spacing: .04em; color: var(--ink); outline-offset: 4px; }
.st-panel .pr input[type=text] { flex: 1; width: auto; }
.st-panel .syntax { margin: 10px 0 0; font-size: 12px; letter-spacing: .06em; line-height: 2; }
.st-panel .syntax code { margin-left: 8px; }
.st-panel .inks { flex-wrap: wrap; gap: 2px 3px; }
.st-panel .inks button.none i { background: repeating-conic-gradient(#e4e0d6 0 25%, #fffefb 0 50%) 0 0 / 7px 7px; }
.inks .pick { position: relative; width: 24px; height: 24px; display: inline-grid; place-items: center; cursor: pointer; }
.inks .pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; }
.inks .pick i { display: block; width: 14px; height: 14px; border-radius: 50% 45% 52% 48%; background: conic-gradient(#d4452e, #e2a23a, #c9c43a, #8db33a, #3a8fa6, #4a5fb3, #8a4fb3, #d4452e); box-shadow: inset 0 0 0 1px rgba(29, 27, 24, .22); pointer-events: none; }
.inks .pick:focus-within { outline: 2px solid var(--green); outline-offset: 1px; }
/* 字体：头像下面写着字体名 */
.st-panel .who { flex-wrap: wrap; gap: 2px 4px; }
.st-panel .who button { width: auto; height: auto; min-width: 52px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 4px 2px; background: none; }
.st-panel .who button.on { background: none; }
.st-panel .who button canvas { width: 36px; height: 36px; padding: 0; }
.st-panel .who button.on canvas { background: var(--ring) center / 100% 100% no-repeat; }
.st-panel .who button span { font-size: 11.5px; letter-spacing: .06em; white-space: nowrap; max-width: 6em; overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px; }
.st-panel .who button.on span { background: var(--uline) 0 100% / 100% 4px no-repeat; }
.st-panel .actions { margin-top: 10px; }
.st-panel .actions .btn { padding: 8px 16px 9px; font-size: 12.5px; letter-spacing: .14em; }
.st-panel .check { margin-top: 8px; }
.st-panel .seg { gap: 2px 4px; }

.sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.sizes button { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 9px 2px 8px; cursor: pointer; text-align: left; color: var(--ink); transition: transform .2s steps(3); }
.sizes button:hover { transform: translateX(2px); }
.sizes b { font: 400 13.5px/1.3 var(--zh); letter-spacing: .08em; padding-bottom: 3px; background: var(--uline) 0 100% / 0 5px no-repeat; transition: background-size .25s steps(3); }
.sizes button.on b, .sizes button:hover b { background-size: 100% 5px; }
.sizes small { font: 400 11px/1 "Jost", var(--sans); letter-spacing: .06em; white-space: nowrap; }
.pr.custom { margin-top: 12px; gap: 6px 8px; }
.pr.custom .x { font-size: 13px; }
.pr.custom .num { width: 4.2em; }

.layers { list-style: none; margin: 0; padding: 0; }
.layers button { display: flex; align-items: baseline; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 7px 2px; cursor: pointer; text-align: left; color: var(--ink); min-width: 0; }
.layers small { flex: none; width: 4.2em; font-size: 11px; font-weight: 500; letter-spacing: .14em; }
.layers span { min-width: 0; font-size: 13.5px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-bottom: 2px; background: var(--uline) 0 100% / 0 5px no-repeat; transition: background-size .25s steps(3); }
.layers button:hover span, .layers button:focus-visible span { background-size: 100% 5px; }
.layers em { flex: none; margin-left: auto; font-style: normal; font-size: 11px; letter-spacing: .12em; }

.aligns { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 6px; }
.al { width: 36px; height: 34px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink); transition: transform .2s steps(3); }
.al svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.al:hover { transform: rotate(-5deg); }
.pr.order { gap: 2px 2px; }
.pr.order > .tool-label { margin-right: 6px; }
.scene-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.scene-grid button { border: 0; background: none; padding: 4px 0; cursor: pointer; display: grid; place-items: center; transition: transform .2s steps(3); }
.scene-grid button:hover { transform: rotate(-3deg); }
.scene-grid button.on { background: var(--ring) center / 100% 100% no-repeat; }
.scene-grid canvas { width: 52px; height: 44px; }
.st-credit { margin: 26px 0 0; font-size: 11px; line-height: 1.9; letter-spacing: .04em; color: var(--ink-2); }
.st-credit a { color: inherit; }

/* 选中一块时最上面那一行：贴边 / 居中、往上一层、往下一层 */
.quick { display: flex; align-items: center; flex-wrap: wrap; gap: 0 1px; margin: -4px 0 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.quick .sep { width: 1px; height: 18px; margin: 0 5px; background: var(--line); }
.quick .al { width: 31px; }
.al:disabled { opacity: .3; cursor: default; transform: none; }
.st-panel .tbtn:disabled, .st-panel .num:disabled { opacity: .35; cursor: default; }
/* 「更多」：不常用的设置收起来 */
.more { margin: 8px 0 2px; }
.more > summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 6px 0 7px; font-size: 12.5px; letter-spacing: .1em; background: var(--uline) 0 100% / 0 5px no-repeat; transition: background-size .25s steps(3); }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: ""; width: 10px; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.6 1.9 C3.2 3.4 4.6 5 6 6.3 C7.6 4.7 9 3.2 10.5 1.7' fill='none' stroke='%231d1b18' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; transform: rotate(-90deg); transition: transform .2s steps(3); }
.more[open] > summary::before { transform: none; }
.more > summary:hover, .more > summary:focus-visible { background-size: 100% 5px; }
/* 写得认真还是随便：两头写着字，中间一根滑杆；那一道刻度是这位写字的人在网站上平常的样子 */
.pr.casual { display: grid; grid-template-columns: 3.4em auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.pr.casual .a, .pr.casual .b { font-size: 12.5px; letter-spacing: .08em; white-space: nowrap; }
.pr.casual input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; cursor: pointer;
  background: linear-gradient(rgba(29, 27, 24, .6), rgba(29, 27, 24, .6)) calc(10px + (100% - 20px) * var(--def, .5)) 50% / 1.5px 13px no-repeat, var(--uline) center / 100% 6px no-repeat; }
.pr.casual input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M11.5 2.2 C6 1.4 2.2 5.4 2.6 10.4 C3 15.2 6.6 18 11 17.6 C15.6 17.2 18 13.6 17.4 9.2 C16.9 5.2 14 2.6 9.4 2.8' fill='%23fffefb' stroke='%231d1b18' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.pr.casual input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M11.5 2.2 C6 1.4 2.2 5.4 2.6 10.4 C3 15.2 6.6 18 11 17.6 C15.6 17.2 18 13.6 17.4 9.2 C16.9 5.2 14 2.6 9.4 2.8' fill='%23fffefb' stroke='%231d1b18' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.pr.casual input[type=range]::-moz-range-track { background: transparent; }
.pr.casual .back { grid-column: 2 / -1; justify-self: start; margin: -4px 0 0 -5px; font-size: 12px; }
.pr.casual .back[hidden] { display: none; }
.st-panel .p-note.first { margin: 0 0 6px; }
/* 写不出来的字 */
.p-warn { margin: 8px 0 0; font-size: 12.5px; letter-spacing: .04em; color: var(--red); }
.p-warn[hidden] { display: none; }
/* 记号的形状：和加记号时一样的小图 */
.mark-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
.mark-grid button { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; padding: 4px 0 3px; cursor: pointer; font-size: 11.5px; letter-spacing: .08em; color: var(--ink); }
.mark-grid canvas { width: 48px; height: 30px; }
.mark-grid button span { padding-bottom: 2px; }
.mark-grid button.on span { background: var(--uline) 0 100% / 100% 4px no-repeat; }
.mark-grid button.on canvas { background: var(--ring) center / 92% 100% no-repeat; }

/* ---------- 窄一点的电脑、平板 ---------- */
@media (max-width: 1180px) {
  .st-main { grid-template-columns: 80px minmax(0, 1fr) 300px; }
  .st-panel { padding: 14px 18px 40px; }
  .st-act span { display: none; }
  .st-size { display: none; }
}
@media (max-width: 960px) and (min-width: 761px) {
  .st-main { grid-template-columns: 76px minmax(0, 1fr) 270px; }
}

/* ---------- 手机：纸粘在顶上，下面是加东西和设置 ---------- */
@media (max-width: 760px) {
  .studio { margin-top: 56px; height: auto; min-height: 0; display: block; }
  .st-top { padding: 4px 14px 6px; gap: 2px 12px; min-height: 0; }
  .st-title { min-height: 30px; }
  .st-acts { margin-left: 0; width: 100%; justify-content: flex-end; gap: 10px; }
  .st-act { display: none; }   /* 手机上撤销、重做在纸的角上（.st-mini），顶上这一对就不重复了 */
  .st-acts .btn { padding: 8px 12px 9px; letter-spacing: .1em; }
  #stPlay { width: auto; min-width: 8.6em; }
  #stSave { min-width: 0; }
  .st-main { display: flex; flex-direction: column; }
  .st-stage { order: 0; position: sticky; top: 56px; z-index: 4; height: 50vh; height: 50svh; min-height: 280px; border-bottom: 1px solid var(--line); transition: top .45s steps(4); }
  html.bar-hidden .st-stage { top: 0; }
  .st-rail { order: 1; flex-direction: row; justify-content: space-around; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 4px 6px; }
  .st-add { padding: 6px 4px 5px; font-size: 11.5px; letter-spacing: .06em; }
  .st-add canvas, .st-add .ico-print { width: 30px; height: 30px; }
  .st-add .ico-print { font-size: 20px; }
  .st-panel { order: 2; border-left: 0; padding: 12px 16px calc(60px + env(safe-area-inset-bottom)); overflow: visible; }
  .st-pick, .st-ex { position: fixed; left: 0; right: 0; bottom: 0; top: auto !important; width: auto; z-index: 40; max-height: 72vh; overflow-y: auto; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: var(--paper); box-shadow: 0 -1px 0 var(--line); transform: translateY(8px); }
  .st-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-close { display: inline-block; }
  .st-menu-t { margin-bottom: 8px; }
  .st-grid canvas { width: 70px; height: 58px; }
  .pr.slide { grid-template-columns: 3.2em minmax(0, 1fr) 3.6em 1.4em; gap: 8px; }
  .pr.casual { grid-template-columns: 3.2em auto minmax(0, 1fr) auto; gap: 4px 8px; }
  .st-add { min-width: 46px; }
  .st-sel .edge.t, .st-sel .edge.b { height: 18px; }
  .st-sel .edge.t { top: -10px; } .st-sel .edge.b { bottom: -10px; }
  .st-sel .edge.l, .st-sel .edge.r { width: 18px; }
  .st-sel .edge.l { left: -10px; } .st-sel .edge.r { right: -10px; }
  .st-zoom { right: 8px; bottom: 8px; }
  .st-tip { left: 8px; bottom: 52px; }
  .st-mini { display: flex; }
  .st-sel .h { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
  .st-sel .h::before { inset: -12px; }
  .st-sel .w, .st-sel .e { width: 10px; height: 24px; margin: -12px 0 0 -5px; }
  .st-sel .n, .st-sel .s { width: 24px; height: 10px; margin: -5px 0 0 -12px; }
  .st-sel .rot { width: 20px; height: 20px; margin-left: -10px; top: -40px; }
  .st-sel .rot::after { left: 9.25px; top: 20px; height: 21px; }
}
