
/* Saved deck editor — dense but legible at tablet and desktop widths. */
.deck-edit-actions button{font-size:12px;padding:8px 6px}
#deckLibrarySelect{font-size:13px}
.deck-editor-group{margin-top:12px;border:1px solid #6c6655;border-radius:5px;background:#1b2723}
.deck-editor-group>summary{cursor:pointer;padding:11px;font:600 13px sans-serif;color:#e4d3ae}
.deck-editor-rows{display:grid;gap:5px;padding:10px}
.deck-editor-row{display:grid;grid-template-columns:26px 72px minmax(0,1fr);align-items:center;gap:8px}
.deck-editor-row>label{display:flex;align-items:center;justify-content:center}
.deck-editor-row input[type=checkbox]{margin:0}
.deck-editor-row select,.deck-editor-row input{min-width:0;width:100%;padding:7px 6px;font:13px sans-serif}
.deck-editor-rank{display:block;padding:6px 8px;color:#cfbd91;font:13px sans-serif;text-align:center}
.deck-editor-footer{position:sticky;bottom:-24px;background:#24312b;border-top:1px solid #6c6655;padding:12px 0 2px;margin-top:15px}
.deck-editor-footer button{font-size:12px;padding:9px 6px}
@media(max-width:470px){.deck-editor-row{grid-template-columns:24px 55px minmax(0,1fr);gap:5px}.deck-editor-rows{padding:6px}.deck-editor-row input{font-size:12px}}

/* Deck selector before card presentation settings: two distinct levels. */
.deck-setting-group{display:grid;gap:8px;margin:4px 0 13px}
.deck-setting-heading{font:600 11px/1.4 sans-serif;letter-spacing:.08em;color:#ceb788;border-bottom:1px solid #82725166;padding:2px 0 7px}
.deck-setting-subheading{margin:8px 0 0}
.deck-setting-group>.field{margin:0}
.deck-setting-group>.deck-edit-actions{margin:0}
.deck-editor-shortcuts{margin:13px 0 17px;gap:8px}
.deck-editor-shortcuts button{min-height:38px;flex:1;white-space:normal;line-height:1.4}
@media(max-width:470px){.deck-editor-shortcuts{gap:6px}.deck-editor-shortcuts button{font-size:11px}}

/* v0.384 — Tarot editor: same clear creation actions and mobile fit as Playing Cards. */
.deck-edit-help{margin:0 0 5px;font-size:11px;line-height:1.5}
.tarot-deck-editor-active .modal{box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overscroll-behavior:contain}
.tarot-deck-editor-active .modal h2{margin:0 32px 10px 0;line-height:1.4;overflow-wrap:anywhere}
.tarot-deck-editor-active .modal input,.tarot-deck-editor-active .modal select{min-width:0}
@media(max-width:600px){
 .tarot-deck-editor-active{padding:12px}
 .tarot-deck-editor-active .modal{width:100%;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:14px;overflow-y:auto}
 .tarot-deck-editor-active .modal h2{font-size:17px}
 .tarot-deck-editor-active .deck-editor-row{grid-template-columns:24px 54px minmax(0,1fr);gap:5px}
 .tarot-deck-editor-active .deck-editor-row input:not([type=checkbox]),.tarot-deck-editor-active .deck-editor-row select,.tarot-deck-editor-active #deckEditorName{font-size:16px}
 .tarot-deck-editor-active .deck-editor-footer{bottom:-14px;display:flex;flex-wrap:wrap;gap:6px;padding:8px 0 4px}
 .tarot-deck-editor-active .deck-editor-footer button{flex:1 1 auto;font-size:12px;padding:8px 4px}
}

/* v0.385 — Tarot editor shares the Playing Card editor's visual hierarchy. */
.tarot-deck-editor-active .tarot-edit-header{background:#202a25;border-bottom:1px solid #79694c;padding:14px;margin:-2px -2px 16px}
.tarot-deck-editor-active .tarot-edit-header small{display:block;font:11px sans-serif;letter-spacing:.22em;color:#c6b58f}
.tarot-deck-editor-active .tarot-edit-header h2{font:600 21px Georgia,"Yu Mincho",serif;margin:8px 0}
.tarot-deck-editor-active .tarot-edit-header p{font:12px/1.6 sans-serif;color:#c6c0ae;margin:6px 0 10px}
.tarot-deck-editor-active .tarot-editor-back{font-size:12px;padding:7px 10px}
.tarot-deck-editor-active .tarot-edit-manage{margin:0 0 16px}
.tarot-deck-editor-active .tarot-edit-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tarot-deck-editor-active .tarot-edit-actions button{font-size:12px;padding:9px 5px;white-space:normal;line-height:1.4}
.tarot-deck-editor-active .tarot-edit-manage .note{margin:9px 0 0;line-height:1.6}
@media(max-width:600px){.tarot-deck-editor-active .tarot-edit-header{padding:12px;margin:0 0 13px}.tarot-deck-editor-active .tarot-edit-header h2{font-size:19px}.tarot-deck-editor-active .tarot-edit-actions{gap:6px}}

/* v0.386: compact Tarot editor, without its separate branded header. */
.tarot-deck-editor-active #modalContent>h2{margin:0 32px 10px 0;font-size:18px}
.tarot-deck-editor-active #modalContent>.note{line-height:1.6;margin:0 0 14px}

/* v0.387: shared compact navigation in both deck editors. */
.tarot-deck-editor-active .tarot-editor-nav{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:0 0 10px;margin:0 0 14px;border-bottom:1px solid #695c45;font:12px sans-serif}
.tarot-deck-editor-active .tarot-editor-nav button{border:0;padding:0;margin:0;min-width:0;background:none;color:#ebd4a5;font:inherit;text-decoration:underline;cursor:pointer}
.tarot-deck-editor-active .tarot-editor-nav a{color:#ebd4a5;text-decoration:underline}

/* v0.388: equal deck action heights and embedded Playing Card editor. */
#cardGalleryOpen,.deck-setting-group .deck-edit-actions>button,.deck-setting-group .deck-edit-actions>a{box-sizing:border-box;display:flex!important;align-items:center;justify-content:center;gap:10px;width:100%;min-height:44px;height:44px;padding:8px 12px!important;margin:0!important;font:12px/1.3 sans-serif!important;text-align:center;white-space:normal;text-decoration:none}
#cardGalleryOpen svg{flex:none;width:18px;height:20px}
.deck-setting-group .deck-edit-actions{width:100%}
.playing-deck-editor-active{padding:12px}
.playing-deck-editor-active>.modal{display:flex;flex-direction:column;width:min(1120px,100%);max-height:calc(100dvh - 24px);height:calc(100dvh - 24px);padding:8px;overflow:hidden}
.playing-deck-editor-active>.modal>.close{position:relative;z-index:2;flex:none;align-self:flex-end;width:32px;height:32px;padding:4px}
.playing-deck-editor-active #modalContent{display:flex;flex:1;min-height:0;overflow:hidden}
#playingDeckEditorFrame{display:block;width:100%;height:100%;min-height:0;border:0;background:#17211c;border-radius:5px}
@media(max-width:600px){.playing-deck-editor-active{padding:4px}.playing-deck-editor-active>.modal{width:100%;max-width:100%;height:calc(100dvh - 8px);max-height:calc(100dvh - 8px);padding:5px}}

/* v0.389 — PLAYING CARD uses the exact same direct modal container as TAROT. */
.playing-direct-editor-active .playing-editor-heading{font:600 14px sans-serif;margin:16px 0 9px;color:#e4d3ae}
.playing-direct-editor-active .playing-editor-heading span{font-weight:normal;color:#bdb29b}
.playing-direct-editor-active .playing-editor-tabs{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:10px}
.playing-direct-editor-active .playing-editor-tabs button{font:12px sans-serif;padding:7px 9px}
.playing-direct-editor-active .playing-editor-tabs button.selected{background:#78623d;border-color:#c5a46d}
.playing-direct-editor-active .playing-editor-rows{display:grid;gap:6px}
.playing-direct-editor-active .playing-editor-row{display:grid;grid-template-columns:24px 66px minmax(0,1fr);align-items:center;gap:7px}
.playing-direct-editor-active .playing-editor-mark{text-align:center;font-size:20px;background:#f7f1e5;border-radius:3px}
.playing-direct-editor-active .playing-editor-row input{width:100%;min-width:0;padding:7px 6px}
.playing-direct-editor-active #playingEditorDelete[hidden]{display:none}
@media(max-width:600px){.playing-direct-editor-active .playing-editor-row{grid-template-columns:22px 55px minmax(0,1fr);gap:5px}.playing-direct-editor-active .playing-editor-row input{font-size:16px}}

/* LENORMAND uses the same direct editor layout as PLAYING CARD. */
.lenormand-direct-editor-active .lenormand-editor-row{grid-template-columns:24px 42px minmax(0,1fr)}
.lenormand-direct-editor-active .lenormand-editor-row>input[type="checkbox"]{width:18px;height:18px;margin:auto;accent-color:#bfaa79}
.lenormand-direct-editor-active .lenormand-editor-number{font:14px Georgia,serif;color:#dfc79f;text-align:center;font-variant-numeric:tabular-nums}
.lenormand-direct-editor-active #lenormandEditorDelete[hidden]{display:none}
@media(max-width:600px){.lenormand-direct-editor-active .lenormand-editor-row{grid-template-columns:23px 34px minmax(0,1fr)}}

/* Descriptions share the same visual rhythm in TAROT, PLAYING and LENORMAND editors. */
.tarot-deck-editor-active :is(#deckEditorDescription,#playingEditorDescription,#lenormandEditorDescription){box-sizing:border-box;width:100%;min-height:78px;resize:vertical;padding:9px 10px;background:#17211c;color:#eee3cd;border:1px solid #897753;border-radius:4px;font:14px/1.65 'Yu Mincho',serif}
@media(max-width:600px){.tarot-deck-editor-active :is(#deckEditorDescription,#playingEditorDescription,#lenormandEditorDescription){font-size:16px}}
