/* mystudy.css — t656 My Study (Study > My Study). Light (parchment) look by default; dark (cinematic) overrides below. No emoji: icons are inline SVG. */
.ms-view .ms-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .35rem 0; }
.ms-view .ms-row input[type="text"], .ms-view .ms-row input[type="url"] { flex: 1 1 14rem; min-width: 0; min-height: 44px; padding: .4rem .65rem; font: 1rem var(--sans); border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; color: var(--ink); }
.ms-view textarea { width: 100%; box-sizing: border-box; min-height: 6rem; padding: .55rem .65rem; font: 1rem/1.45 var(--sans); border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; color: var(--ink); resize: vertical; }
.ms-view label { font: 600 .85rem var(--sans); color: var(--ink-soft); }
.ms-view .rd-btn { min-height: 44px; }
.ms-view .ms-pri { background: var(--accent); color: #fff8ee; border-color: var(--accent); }
.ms-view .ms-del { color: #a33a2a; }
.ms-new { margin: .8rem 0 1rem; }
.ms-studies { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ms-scl { display: flex; flex-direction: column; gap: .15rem; padding: .75rem .9rem; min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; text-decoration: none; color: var(--ink); }
.ms-scl b { font: 600 1.15rem var(--serif); color: var(--accent); }
.ms-scl small { color: var(--ink-soft); font-size: .8rem; }
.ms-empty { color: var(--ink-soft); font-style: italic; margin: 1rem 0; }
.ms-open { margin: 1.4rem 0 .5rem; } .ms-open summary { cursor: pointer; font: 600 .9rem var(--sans); color: var(--accent); min-height: 44px; display: flex; align-items: center; }
.ms-msg { min-height: 1.2em; font-size: .9rem; color: var(--accent); margin: .3rem 0; }
.ms-banner { padding: .6rem .8rem; border: 1px dashed var(--accent); border-radius: 12px; font-size: .92rem; }
.ms-tools { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .5rem 0 .6rem; }
.ms-tr { display: inline-flex; align-items: center; gap: .35rem; } .ms-tr select { min-height: 40px; max-width: 15rem; }
.ms-share { padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; margin: .3rem 0 .6rem; font-size: .9rem; }
.ms-items { list-style: none; margin: .6rem 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.ms-it { display: flex; gap: .4rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: .5rem .55rem .5rem .35rem; background: #fffdf8; border-left-width: 4px; transition: box-shadow .15s; }
.ms-it.ms-v { border-left-color: var(--accent); }
.ms-it.ms-n { border-left-color: #7a8b5a; background: #fbf8ee; }
.ms-it.ms-lift { box-shadow: 0 10px 28px rgba(0, 0, 0, .3); position: relative; z-index: 3; outline: 2px solid var(--accent); }
body.ms-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.ms-ctl { display: flex; flex-direction: column; gap: .2rem; flex: none; }
.ms-ib { width: 44px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--accent); cursor: pointer; padding: 0; }
.ms-ib:disabled { opacity: .3; cursor: default; }
.ms-drag { cursor: grab; touch-action: none; height: 44px; }
.ms-body { flex: 1 1 auto; min-width: 0; }
.ms-ih { display: flex; align-items: baseline; gap: .5rem; margin: .1rem 0 .2rem; }
.ms-ref { font: 600 1.1rem var(--serif); }
.ms-kind { font: 700 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #5f6f42; }
.ms-vtext { font: 1.08rem/1.55 var(--serif); margin: .1rem 0 .3rem; color: var(--ink); }
.ms-vtext.ms-wait { color: var(--ink-soft); font-style: italic; }
.ms-vn { font: 600 .65rem var(--sans); color: var(--ink-soft); margin-right: .15em; }
.ms-ntext { font: 1rem/1.5 var(--sans); white-space: normal; overflow-wrap: anywhere; margin: .1rem 0 .3rem; }
.ms-off { color: var(--ink-soft); font-size: .82rem; }
.ms-acts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.ms-acts .sr-sm { min-height: 36px; }
.ms-addli { list-style: none; }
.ms-add { border: 1px solid var(--accent); border-radius: 14px; padding: .7rem .8rem; background: #fffdf8; margin: .2rem 0; }
.ms-add h3 { margin: 0 0 .4rem; }
.ms-or { font-size: .8rem; color: var(--ink-soft); margin: .4rem 0 .2rem; }
.ms-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.ms-pick label { display: flex; flex-direction: column; gap: .15rem; }
.ms-pick select { min-height: 44px; font: 1rem var(--sans); }
.ms-prev { font: 1rem/1.45 var(--serif); min-height: 1.4em; margin: .5rem 0; }
.ms-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 1200; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  max-width: calc(100% - 1.5rem); padding: .5rem .6rem .5rem .9rem; border-radius: 14px; background: #2b2217; color: #f4ecd8; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font: .92rem var(--sans); }
.ms-toast button, .ms-toast a { min-height: 40px; padding: 0 .7rem; border-radius: 10px; border: 1px solid rgba(240, 214, 158, .5); background: transparent; color: #f0d69e; font: 600 .88rem var(--sans); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.ms-toast[hidden] { display: none; }
.ms-sheet { position: fixed; inset: 0; z-index: 1150; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; }
.ms-sh-in { width: 100%; max-width: 32rem; box-sizing: border-box; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: #fffdf8; color: var(--ink); display: flex; flex-direction: column; gap: .6rem; }
.ms-sh-in h3 { margin: 0; font: 600 1.3rem var(--serif); color: var(--accent); }
.ms-sh-in label { display: flex; flex-direction: column; gap: .2rem; font: 600 .85rem var(--sans); color: var(--ink-soft); }
.ms-sh-ref label { display: inline-flex; flex-direction: row; align-items: center; gap: .3rem; }
.ms-sh-in select, .ms-sh-in input { min-height: 44px; font: 1rem var(--sans); border: 1px solid var(--line); border-radius: 10px; padding: 0 .5rem; background: #fff; color: var(--ink); }
.ms-sh-msg { color: #a33a2a; min-height: 1em; margin: 0; font-size: .85rem; }
@media (min-width: 700px) { .ms-sheet { align-items: center; } .ms-sh-in { border-radius: 18px; } }

/* dark (default) */
html:not(.light) .ms-view .ms-row input, html:not(.light) .ms-view textarea, html:not(.light) .ms-sh-in select, html:not(.light) .ms-sh-in input { background: #120e09; color: var(--cream); border-color: var(--line); }
html:not(.light) .ms-scl, html:not(.light) .ms-it, html:not(.light) .ms-add { background: var(--surface), #15100b; color: var(--ink); }
html:not(.light) .ms-scl b { color: var(--gold2); }
html:not(.light) .ms-it.ms-n { background: linear-gradient(180deg, rgba(150, 170, 110, .07), rgba(150, 170, 110, .02)), #14110b; border-left-color: #93a56a; }
html:not(.light) .ms-it.ms-v { border-left-color: var(--gold); }
html:not(.light) .ms-kind { color: #b5c68c; }
html:not(.light) .ms-ib { color: var(--gold2); background: rgba(217, 179, 106, .05); }
html:not(.light) .ms-view .ms-pri { background: linear-gradient(180deg, #e3c27e, #c99f52); color: #1a130a; border-color: #d9b36a; }
html:not(.light) .ms-view .ms-del { color: #f0a08f; }
html:not(.light) .ms-msg { color: var(--gold2); }
html:not(.light) .ms-sh-in { background: #17120c; border: 1px solid var(--line); }
html:not(.light) .ms-sh-in h3 { color: var(--gold2); }
html:not(.light) .ms-sh-msg { color: #f0a08f; }
html:not(.light) .ms-banner { border-color: var(--gold); }
html:not(.light) .ms-it.ms-lift { outline-color: var(--gold2); box-shadow: 0 14px 34px rgba(0, 0, 0, .6); }

/* Print: only the study, without buttons */
@media print {
  body.ms-printing > *:not(#views), body.ms-printing #views > *:not(#ms-view) { display: none !important; }
  body.ms-printing .ms-ctl, body.ms-printing .ms-acts, body.ms-printing .ms-tools, body.ms-printing .st-tabs, body.ms-printing .mz-crumbs, body.ms-printing .ms-share, body.ms-printing .ms-msg, body.ms-printing .ms-add, body.ms-printing .ms-banner, body.ms-printing .sr-tip { display: none !important; }
  body.ms-printing .ms-it { border: 0; border-left: 3px solid #999; break-inside: avoid; background: none !important; color: #000 !important; }
  body.ms-printing .ms-vtext, body.ms-printing .ms-ntext, body.ms-printing .sr-h, body.ms-printing a { color: #000 !important; }
  .ms-toast, .ms-sheet { display: none !important; }
}
@media print { html body.ms-printing { background: #fff !important; color: #000 !important; } html body.ms-printing::before, html body.ms-printing::after { display: none !important; } }
.ms-more { display: block; }
.ms-more[open] { flex-basis: 100%; }
.ms-more > summary { list-style: none; display: inline-flex; align-items: center; }
.ms-more > summary::-webkit-details-marker { display: none; }
.ms-more[open] > summary { background: var(--parchment-dark); }
.ms-more > .ms-tools { flex-basis: 100%; margin: .2rem 0 0; padding: .55rem; border: 1px solid var(--line); border-radius: 12px; }
