
:root{font-family:-apple-system,BlinkMacSystemFont,'Hiragino Kaku Gothic ProN',sans-serif;color:#203b33;background:#f3f5f2;font-size:15px;--green:#175641}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,select,input{min-height:44px}button{cursor:pointer;background:white;color:inherit;border:1px solid #ccd5ce;border-radius:9px;padding:9px 14px}button.active,.primary{background:var(--green);color:white;border-color:var(--green)}button:hover{filter:brightness(.96)}header{background:white;border-bottom:1px solid #dce2dd;padding:18px max(20px,calc((100vw - 1120px)/2));display:flex;align-items:center;justify-content:space-between;gap:12px}h1{font-size:21px;margin:0}h2{font-size:19px;margin:0 0 16px}h3{font-size:15px}small,.muted{color:#66786e;font-size:12px}main{max-width:1160px;padding:24px 20px;margin:auto}.bar,.tabs,.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.bar{justify-content:space-between;margin-bottom:18px}.tabs{margin-bottom:20px}.panel{background:white;border:1px solid #dde4de;border-radius:14px;padding:22px;margin-bottom:18px}.stats{display:flex;gap:10px;margin:18px 0}.stats button{flex:1;text-align:left}.stats strong{display:block;font-size:30px;margin-top:6px}input,select,textarea{padding:10px;border:1px solid #bdc9bf;border-radius:8px;background:white;max-width:100%;color:#203b33}input[type=checkbox]{min-height:0}input[type=search]{width:270px}table{border-collapse:collapse;width:100%}th{text-align:left;font-size:12px;color:#63756b;background:#f3f6f2}td,th{padding:14px 10px;border-bottom:1px solid #e0e6df}td small{display:block;margin-bottom:4px}.name{font-weight:650}.badge{display:inline-block;background:#eef3ef;border-radius:5px;padding:4px 7px;font-size:12px}.changed{color:#a12c25;font-weight:700}.tag{background:#fff0ce}.tablebox{overflow:auto}.cards{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.card{border:1px solid #d9e2db;border-radius:10px;padding:16px;display:flex;gap:12px;align-items:center;justify-content:space-between}.card small{display:block}.card .row{margin-top:8px}dialog{border:1px solid #cad5cc;border-radius:18px;padding:24px;width:480px;max-width:calc(100% - 24px);max-height:90vh}dialog::backdrop{background:#132c2580}label.field{display:block;margin-bottom:14px}.field input,.field select,.field textarea{display:block;width:100%;margin-top:6px}.actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.error{color:#a32323;background:#fff1ef;padding:12px;border-radius:8px}.hidden{display:none!important}.preview{background:#e9eee9;text-align:center;border-radius:12px;padding:18px;margin-top:20px}.preview img{width:470px;max-width:100%;height:auto;box-shadow:0 3px 20px #203b331a}.catalog{display:grid;grid-template-columns:1fr 1fr;gap:20px}.sample{border:1px solid #dce4dc;border-radius:9px;padding:16px}.notice{font-size:12px;color:#66786e;margin-top:12px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#173e31;color:white;padding:14px 22px;border-radius:10px;z-index:10;max-width:90vw}.empty{text-align:center;padding:40px;color:#66786e}@media(max-width:600px){header{padding:16px}main{padding:16px 12px}.panel{padding:16px 12px}.catalog,.cards{grid-template-columns:1fr}td,th{padding:12px 6px;font-size:13px}.optional{display:none}td button{padding:8px}.tabs{gap:6px}.tabs button{padding:9px 10px}.bar{align-items:stretch}.bar input{width:100%}h1{font-size:18px}.stats{gap:6px}.stats button{padding:10px}.stats strong{font-size:26px}dialog{margin:auto auto 12px} }

[hidden]{display:none!important}.header-actions{display:flex;align-items:center;gap:10px}.slot-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}.slot-row input[type=time]{width:120px}.compact{font-size:12px}.muted-note{font-size:12px;color:#66786e;margin:8px 0}.auth{max-width:440px;margin:8vh auto}.auth h1{margin-bottom:20px}button:disabled{opacity:.5;cursor:wait}.history-item{padding:12px 0;border-bottom:1px solid #ddd}.pending{color:#9a5700}.selection{background:#e6eee8;padding:12px;border-radius:8px}.changed-marker{font-size:12px;color:#aa3028} @media(max-width:600px){.header-actions{flex-wrap:wrap;justify-content:flex-end}.slot-row{align-items:stretch}.slot-row>input{max-width:100%}}
.full-image{width:100%}

pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px} .sample{margin:12px 0}.danger{color:#a32323}.restore-choice{display:flex;gap:10px;align-items:flex-start}.restore-choice span{min-width:0}#restoreReview{width:760px}#imageDialog{width:720px}#backupList{max-height:220px;overflow:auto;margin-top:12px}.actions{flex-wrap:wrap}@media(max-width:600px){.tablebox table{min-width:570px}.actions button{flex:1}#view{min-width:100px}.header-actions small{display:block}.field{line-height:1.8}}

header h1{white-space:nowrap}.account{position:relative}.account summary{cursor:pointer;padding:12px}.account[open] .header-actions{position:absolute;right:0;top:44px;background:white;padding:16px;border:1px solid #ccd5ce;border-radius:10px;z-index:3;width:240px;box-shadow:0 8px 24px #203b3320}.account .header-actions>*{width:100%}

/* Spreadsheet presentation: compact rows, explicit columns, no card layout. */
#schedule .panel{padding:10px;border-radius:2px}#schedule .bar{margin-bottom:8px;gap:6px}#schedule .row{gap:6px}#schedule .stats{margin:8px 0;gap:0;border:1px solid #87928d;background:white}#schedule .stats button{min-height:36px;padding:5px 12px;border:0;border-right:1px solid #aab3ae;border-radius:0;flex:initial;font-size:15px}#schedule .stats strong{display:inline;font-size:18px;margin-left:7px}#schedule button,#schedule input,#schedule select{border-radius:2px}#schedule details{margin:6px 0;font-size:13px}.compact-roster table{table-layout:fixed;border:1px solid #77817b;width:100%;min-width:620px}.compact-roster .number-col{width:5%}.compact-roster .name-col{width:33%}.compact-roster .time-col{width:18%}.compact-roster .place-col{width:20%}.compact-roster .memo-col{width:24%}.compact-roster th,.compact-roster td{border:1px solid #87928b;padding:0;color:#111;vertical-align:middle}.compact-roster th{background:#dfe2e5;padding:6px 8px;font-size:17px;font-weight:700;white-space:nowrap}.compact-roster td:first-child{text-align:center;font-size:18px}.compact-roster .cell-edit{display:block;border:0;border-radius:0;background:transparent;width:100%;text-align:center;padding:5px 8px;min-height:36px;line-height:1.2;font-size:20px;font-weight:600;color:#111}.compact-roster .name-edit{text-align:left;font-weight:500}.compact-roster .memo-edit{text-align:left;font-size:15px;overflow-wrap:anywhere}.compact-roster small{font-size:11px;line-height:1.1;color:#444;margin:1px 0 0;font-weight:400}.compact-roster .changed,.compact-roster .changed small{color:#b00000;font-weight:700}.compact-roster .group-church{background:#e4eddf}.compact-roster .group-stream{background:#e7eef7}.compact-roster .group-other{background:#f4f0df}.compact-roster .place-boundary td{border-top:2px solid #64736a}.compact-roster .cell-edit:focus-visible{outline:2px solid #175641;outline-offset:-2px}.compact-roster .cell-edit:hover{background:#ffffff45}.compact-roster thead th{position:sticky;top:0;z-index:1}@media(max-width:600px){#schedule .panel{padding:6px}#schedule .stats button{padding:5px 8px;font-size:13px}#schedule .stats strong{font-size:16px;margin-left:4px}.compact-roster table{min-width:560px}.compact-roster .cell-edit{font-size:17px;padding:6px;min-height:36px}.compact-roster th{font-size:14px;padding:5px}.compact-roster .memo-edit{font-size:13px}main{padding:10px 8px}.tabs{margin-bottom:10px}}
.compact-roster th .cell-edit{text-align:left;font-size:14px;font-weight:700;white-space:nowrap}.place-options{display:grid;grid-template-columns:repeat(2,minmax(110px,1fr));gap:8px;margin-bottom:16px}.inline-memo{display:grid;gap:4px;padding:4px}.inline-memo input,.inline-memo select{width:100%;min-width:0;padding:5px;font-size:16px}.inline-memo button{padding:5px}.cell-edit[data-placecell]{-webkit-touch-callout:none;user-select:none}
/* Legacy layout, with readable mobile spreadsheet columns. */
header{padding:12px max(12px,calc((100vw - 1120px)/2));min-height:60px}header h1{font-size:20px}main{padding-top:12px}#nav{margin:10px 0}#nav button{padding:9px 13px}.session-tabs{display:flex;gap:4px;flex-wrap:wrap;margin:8px 0}.session-tabs button{flex:1;padding:8px 10px;white-space:nowrap;border:1px solid #bdcbc2;background:#f2f5f2;color:#243b31}.session-tabs button.active{background:#235740;color:white}.week-navigation{display:flex;justify-content:center;align-items:center;gap:14px;margin:8px 0}.week-navigation button{padding:5px 12px}.week-navigation strong{font-size:16px}.compact-roster th .cell-edit{padding:4px 1px}.compact-roster th{padding:4px}#topBackup{padding:8px 12px;font-size:13px}#schedule #slot[hidden]{display:none}
@media(max-width:600px){header{padding:8px 10px;min-height:48px}header h1{font-size:17px}.account summary{padding:8px;font-size:12px}#nav{display:flex;gap:4px}#nav button{flex:1;font-size:12px;padding:9px 3px}main>.bar{gap:5px}#savedAt{font-size:10px}#refresh{font-size:11px;padding:6px}main>.bar label{font-size:10px}.session-tabs{gap:3px}.session-tabs button{padding:9px 3px;font-size:12px;min-width:60px}.week-navigation{gap:10px}.week-navigation strong{font-size:13px}#schedule .stats button{flex:1;padding:5px 2px;font-size:11px}#schedule .stats strong{font-size:15px;margin-left:3px}#schedule .compact-roster table{min-width:0;width:100%}.compact-roster .number-col{width:8%}.compact-roster .name-col{width:29%}.compact-roster .time-col{width:20%}.compact-roster .place-col{width:20%}.compact-roster .memo-col{width:23%}.compact-roster th{padding:1px}.compact-roster th .cell-edit{font-size:10px;white-space:normal;padding:5px 1px}.compact-roster .cell-edit{padding:6px 3px;font-size:13px;min-height:40px;overflow-wrap:anywhere}.compact-roster .name-edit{font-size:14px}.compact-roster td:first-child{font-size:11px}.compact-roster small{font-size:9px}.compact-roster .memo-edit{font-size:11px}.inline-memo{padding:2px}.inline-memo button{font-size:11px;padding:4px 2px}.inline-memo input,.inline-memo select{font-size:16px}.compact-roster td{vertical-align:middle}#schedule #search{width:48%;min-width:0}#sortPlace,#sortName{font-size:11px;padding:7px}#course{max-width:175px;font-size:13px}#week{font-size:12px;max-width:130px}#imageSave,#sessionEdit{font-size:12px;padding:8px}#topBackup{font-size:11px;padding:7px}}
@media(max-width:600px){main>.bar{align-items:center;flex-wrap:nowrap;margin-bottom:5px}#savedAt{max-width:70%;font-size:9px}#refresh{min-height:32px;padding:5px}#nav button{min-height:36px}.session-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}.session-tabs button{min-width:0;font-size:10px;min-height:38px;padding:6px 1px}.week-navigation{margin:3px 0}.week-navigation button{min-height:32px;padding:3px 10px}#schedule .panel>.bar:first-child{display:grid;grid-template-columns:1fr auto;align-items:end}#schedule .panel>.bar:first-child>.row{display:grid;grid-template-columns:1fr;gap:4px}#schedule .panel>.bar:first-child>.row>label{display:flex;align-items:center;gap:6px;font-size:11px}#schedule #course{max-width:100%;width:100%;min-height:34px;padding:5px}#schedule #week{min-height:32px;padding:4px;width:128px}#imageSave{min-height:36px;align-self:start}#sessionEdit:not([hidden]){grid-column:2;grid-row:2;min-height:32px}#schedule .compact-roster th:first-child .cell-edit{font-size:9px;white-space:nowrap}#schedule #search{min-height:36px;padding:6px}#schedule #sortPlace,#schedule #sortName{min-height:36px}}
@media(max-width:600px){.compact-roster tr:has(.inline-memo){position:relative;padding-bottom:120px;display:table-row}.compact-roster td:has(.inline-memo){position:static}.compact-roster tr:has(.inline-memo)>td{padding-bottom:132px}.compact-roster .inline-memo{position:absolute;left:5px;right:5px;bottom:5px;display:grid;grid-template-columns:85px 1fr;gap:6px;background:#fff;padding:8px;border:1px solid #b9c8be;border-radius:8px}.inline-memo>div{grid-column:1/-1;display:flex;gap:8px}.inline-memo>div button{min-height:36px;flex:1}.inline-memo>small{grid-column:1/-1}}
#imageDialog[open]{display:flex;flex-direction:column;overflow:hidden;max-height:90vh}#imageDialog .image-scroll{overflow:auto;min-height:0;flex:1}#imageDialog h2,#imageDialog p,#imageDialog>.bar,#imageDialog>.actions{flex-shrink:0}#imageDialog>.actions{margin-top:10px;padding-top:8px;border-top:1px solid #e0e6e2;background:white}#imageDialog .image-scroll img{display:block;width:100%;height:auto}@media(max-width:600px){#imageDialog{padding:14px;margin:auto;max-height:90dvh}#imageDialog h2{font-size:18px;margin-bottom:4px}#imageDialog p{font-size:12px;margin:5px 0 10px}#imageDialog>.bar{margin-bottom:8px}#imageDialog button{font-size:12px;padding:8px 6px}#imageDialog .actions{gap:5px}}
/* Approved A: soft sage, calm horizontal rules, compact editable rows. */
:root{--green:#426b54;background:#f5f8f4;color:#294434}body{background:#f5f8f4}#schedule .panel{border:1px solid #dce7db;border-radius:14px;background:linear-gradient(#f4f9f1 0,#fff 200px);padding:12px}#schedule button,#schedule input,#schedule select{border-radius:8px}#schedule .session-tabs{gap:5px}#schedule .session-tabs button{border:1px solid #e0e8de;background:#fff;color:#45604e}#schedule .session-tabs button.active{background:#557d60;color:white;border-color:#557d60}#schedule .stats{border:0;background:#edf4eb;border-radius:9px;overflow:hidden}#schedule .stats button{border:0;border-radius:0;background:transparent;color:#47614e}#schedule .stats button.active{background:#dcead7;color:#284a31}#schedule .stats button+button{border-left:1px solid #deeadb}.compact-roster{border:1px solid #dfe9df;border-radius:11px;overflow:auto}.compact-roster table{border:0}.compact-roster th,.compact-roster td{border:0;border-bottom:1px solid #e5ece4;color:#294233}.compact-roster th{background:#e7f0e2}.compact-roster .group-church,.compact-roster .group-stream,.compact-roster .group-other{background:#fff}.compact-roster tbody tr:nth-child(even){background:#f0f6ee}.compact-roster .place-boundary td{border-top:1px solid #d7e3d4}.compact-roster .cell-edit{color:#294233;font-weight:500}.compact-roster .name-edit{font-weight:500}.compact-roster .changed,.compact-roster .changed small{color:#ac3932;font-weight:600}.compact-roster th .cell-edit{color:#48634f;font-weight:600}.compact-roster td:first-child{color:#83907f;font-size:14px}.compact-roster small{color:#7a8775}.week-navigation button{border-color:transparent;background:transparent}.compact-roster .cell-edit:hover{background:#e6f0df66}#nav button{border-color:#e0e8dd;box-shadow:none}#nav button.active{background:#557d60;border-color:#557d60}#imageSave{background:#557d60;border-color:#557d60}#schedule .inline-memo button{border:1px solid #d4dfce;border-radius:7px}@media(max-width:600px){#schedule .panel{padding:7px;border-radius:12px}.compact-roster td:first-child{font-size:11px}.compact-roster .cell-edit{min-height:42px}.compact-roster th{background:#e7f0e2}}
.cell-edit[data-time]{-webkit-touch-callout:none;user-select:none}
