:root{
  --ink:        #0b0e14;
  --ink-raised: #161a23;
  --ink-raised-2: #1b202c;
  --parchment:  #e9e1d0;
  --parchment-dim: #b9b2a2;
  --brass:      #8b7355;
  --verdigris:  #6f8f76;
  --verdigris-bright: #93b89a;
  --danger:     #a65b4b;

  --accent-gold:   #c9a15a;
  --accent-blue:   #6f93c9;
  --accent-red:    #c97a6f;
  --accent-violet: #9b7fd6;
  --accent-green:  #6fc9a1;
  --accent-teal:   #6fc9c1;

  --font-display: 'Fraunces', serif;
  --font-body: 'Source Serif 4', serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --shadow-card: 0 30px 60px -20px rgba(0,0,0,0.55), 0 2px 0 rgba(233,225,208,0.03) inset;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
*{ box-sizing: border-box; }
html{ background: var(--ink); height: 100%; }
body{
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
body.is-ready{ opacity: 1; transform: none; }
::selection{ background: var(--verdigris); color: var(--ink); }
:focus-visible{
  outline: 2px solid var(--verdigris-bright);
  outline-offset: 3px;
}
button{
  width: 100%;
  background: var(--verdigris);
  color: var(--ink);
  border: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s var(--ease), box-shadow 0.25s ease;
}
button:hover:not(:disabled){
  background: var(--verdigris-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -6px rgba(111,143,118,0.55);
}
button:active:not(:disabled){ transform: translateY(0); }
button:disabled{ opacity: 0.55; cursor: not-allowed; }
.atmosphere{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.atmosphere::before{
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(52rem 38rem at 18% 8%, rgba(111,143,118,0.10), transparent 60%),
    radial-gradient(46rem 34rem at 84% 92%, rgba(139,115,85,0.09), transparent 55%),
    radial-gradient(70rem 70rem at 50% 50%, rgba(15,18,25,0) 0%, rgba(7,9,13,0.55) 100%);
  animation: drift 26s ease-in-out infinite alternate;
}
.atmosphere::after{
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce){
.atmosphere::before{ animation: none; }
}
.sigil{
  width: 26px;
  height: 26px;
  margin: 0 auto 1.1rem;
  display: block;
  fill: var(--verdigris);
  filter: drop-shadow(0 0 5px rgba(111,143,118,0.5));
  animation: breathe 3.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){
.sigil{ animation: none; }
}
.view{ display: none; }
.view.active{ display: block; }
@keyframes drift{
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-1.5%, 1%, 0) scale(1.03); }
}
@keyframes breathe{
  0%, 100% { filter: drop-shadow(0 0 3px rgba(111,143,118,0.35)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 10px rgba(147,184,154,0.85)); transform: scale(1.07); }
}

html:has(#view-essay.active){ background: #f9fbfd; }
body:has(#view-essay.active){ opacity: 1; transform: none; transition: none; background: #f9fbfd; }

.gd{
  --gd-bg: #f9fbfd;
  --gd-text: #1f1f1f;
  --gd-icon: #444746;
  --gd-tb: #edf2fa;
  --gd-hover: rgba(68,71,70,0.08);
  --gd-press: rgba(68,71,70,0.14);
  --gd-active: #d3e3fd;
  --gd-blue: #0b57d0;
  --gd-line: #c7c7c7;
  --gd-ui: 'Google Sans', 'Google Sans Text', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: var(--gd-bg);
  color: var(--gd-text);
  font: 400 14px/1.4 var(--gd-ui);
  -webkit-font-smoothing: auto;
}
.gd ::selection{ background: #b4d7ff; color: inherit; }
.gd :focus-visible{ outline: 2px solid var(--gd-blue); outline-offset: 0; }
.gd .gd-editor:focus-visible, .gd .gd-editor:focus{ outline: none; }
.gd svg{ width: 20px; height: 20px; fill: currentColor; flex: none; display: block; }
.gd-sprite{ position: absolute; width: 0 !important; height: 0 !important; overflow: hidden; }

.gd button{
  width: auto;
  background: none;
  color: inherit;
  border: 0;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  padding: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: none;
}
.gd button:hover:not(:disabled){ background: var(--gd-hover); transform: none; box-shadow: none; }
.gd button:active:not(:disabled){ background: var(--gd-press); }
.gd .gd-btn{ display: inline-flex; align-items: center; justify-content: center; color: var(--gd-icon); }
.gd .gd-btn.is-on{ background: var(--gd-active); color: #041e49; }
.gd .gd-btn.is-on:hover:not(:disabled){ background: #c2d7f8; }

.gd-head{ flex: none; background: var(--gd-bg); }
.gd-titlebar{ display: flex; align-items: center; padding: 8px 16px 2px 12px; min-height: 64px; }
.gd-logo{ flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 6px; border-radius: 50%; }
.gd-logo:hover{ background: var(--gd-hover); }
.gd-logo svg{ width: 21px; height: 28px; }
.gd-titlecol{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gd-titlerow{ display: flex; align-items: center; gap: 2px; height: 30px; }
.gd-title-wrap{ position: relative; display: inline-block; max-width: 100%; min-width: 0; }
.gd-title-measure{ visibility: hidden; white-space: pre; font: 400 18px var(--gd-ui); padding: 0 6px; position: absolute; }
.gd .gd-title{
  font: 400 18px/24px var(--gd-ui);
  color: var(--gd-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 1px 6px;
  height: 28px;
  width: 260px;
  max-width: 100%;
  min-width: 40px;
  margin: 0;
  box-shadow: none;
  text-align: left;
}
.gd .gd-title:hover{ border-color: #1f1f1f; background: transparent; }
.gd .gd-title:focus{ border-color: var(--gd-blue); outline: none; box-shadow: inset 0 0 0 1px var(--gd-blue); background: transparent; }
.gd .gd-ico-sm{ width: 28px; height: 28px; border-radius: 50%; }
.gd .gd-ico-sm svg{ width: 18px; height: 18px; }
.gd .gd-ico-lg{ width: 40px; height: 40px; border-radius: 50%; }
.gd .gd-ico-lg svg{ width: 22px; height: 22px; }
.gd #gd-star.is-starred{ color: #f4b400; }
.gd-status{ display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px; color: var(--gd-icon); border-radius: 14px; }
.gd-status svg{ width: 18px; height: 18px; }
.gd-status-text{ font-size: 12px; color: #5e5e5e; }
.gd-status-text:empty{ display: none; }
.gd-status.is-saving svg{ animation: gdspin 1s linear infinite; }
@keyframes gdspin{ to{ transform: rotate(-360deg); } }

.gd-menubar{ display: flex; align-items: center; height: 26px; margin-left: -1px; overflow-x: auto; scrollbar-width: none; }
.gd-menubar::-webkit-scrollbar{ display: none; }
.gd .gd-menu-btn{ font: 400 14px/20px var(--gd-ui); color: var(--gd-text); padding: 2px 7px; border-radius: 4px; white-space: nowrap; height: 24px; }
.gd .gd-menu-btn.is-open{ background: var(--gd-press); }

.gd-head-right{ flex: none; display: flex; align-items: center; gap: 6px; margin-left: 12px; }
.gd .gd-meet{ height: 40px; padding: 0 6px 0 12px; border-radius: 20px; gap: 0; }
.gd .gd-meet svg{ width: 22px; height: 22px; }
.gd .gd-caret{ width: 18px; height: 18px; margin-left: -2px; }
.gd .gd-share{
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 20px 0 16px; margin: 0 4px 0 6px;
  border-radius: 20px; background: #c2e7ff; color: #001d35;
  font: 500 14px var(--gd-ui); letter-spacing: 0.01em;
}
.gd .gd-share:hover:not(:disabled){ background: #b3dbf5; box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px 1px rgba(0,0,0,0.15); }
.gd .gd-share svg{ width: 18px; height: 18px; }
.gd-avatar{
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin: 0 4px 0 8px; border-radius: 50%;
  background: #7b1fa2; color: #fff; font: 500 15px var(--gd-ui);
  box-shadow: 0 0 0 4px var(--gd-bg); cursor: pointer; user-select: none;
}

.gd-toolbar{
  display: flex; align-items: center;
  height: 40px; margin: 6px 8px 8px; padding: 0 6px 0 8px;
  background: var(--gd-tb); border-radius: 24px;
}
.gd-tb-scroll{ flex: 1; min-width: 0; display: flex; align-items: center; gap: 1px; overflow-x: auto; scrollbar-width: none; height: 100%; }
.gd-tb-scroll::-webkit-scrollbar{ display: none; }
.gd-tb-end{ flex: none; display: flex; align-items: center; gap: 2px; padding-left: 4px; }
.gd .gd-tb{ width: 28px; height: 28px; flex: none; }
.gd .gd-tb svg{ width: 20px; height: 20px; }
.gd .gd-tb-thin{ width: 24px; }
.gd .gd-tb-thin svg{ width: 18px; height: 18px; }
.gd .gd-tb-wide{ width: auto; padding: 0 0 0 4px; }
.gd .gd-tb-search{ height: 28px; padding: 0 10px 0 8px; gap: 6px; border-radius: 14px; margin-right: 4px; font: 400 14px var(--gd-ui); color: var(--gd-text); flex: none; }
.gd .gd-tb-search svg{ width: 18px; height: 18px; color: var(--gd-icon); }
.gd .gd-tb-drop{ height: 28px; padding: 0 0 0 6px; justify-content: space-between; flex: none; font: 400 14px var(--gd-ui); color: var(--gd-text); }
.gd .gd-tb-drop span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.gd .gd-tb-drop svg{ width: 18px; height: 18px; color: var(--gd-icon); }
.gd .gd-w-zoom{ width: 62px; }
.gd .gd-w-style{ width: 112px; }
.gd .gd-w-font{ width: 92px; }
.gd-sep{ flex: none; width: 1px; height: 20px; background: var(--gd-line); margin: 0 4px; }
.gd .gd-size{
  flex: none; width: 34px; height: 24px; margin: 0 2px; padding: 0;
  font: 400 14px var(--gd-ui); color: var(--gd-text); text-align: center;
  background: transparent; border: 1px solid #747775; border-radius: 4px; box-shadow: none;
}
.gd .gd-size:hover{ background: transparent; border-color: #1f1f1f; }
.gd .gd-size:focus{ outline: none; border: 2px solid var(--gd-blue); background: #fff; box-shadow: none; }
.gd .gd-tb-color{ flex-direction: column; gap: 0; }
.gd .gd-tb-color svg{ width: 18px; height: 16px; margin-top: 2px; }
.gd-swatch{ display: block; width: 16px; height: 4px; margin-top: 1px; background: #000; border-radius: 1px; }
#gd-back-swatch{ background: transparent; box-shadow: inset 0 0 0 1px #c7c7c7; }
.gd .gd-mode{ height: 28px; padding: 0 2px 0 8px; gap: 6px; border-radius: 4px; font: 500 14px var(--gd-ui); color: var(--gd-text); }
.gd .gd-mode svg{ width: 18px; height: 18px; color: var(--gd-icon); }

.gd-rulerbar{ flex: none; position: relative; height: 24px; background: var(--gd-bg); overflow: hidden; border-bottom: 1px solid #e3e3e3; }
.gd-ruler{ position: absolute; top: 0; left: 0; width: 816px; height: 23px; background: #fff; transform-origin: 0 0; }
.gd-ruler::before, .gd-ruler::after{ content: ''; position: absolute; top: 0; bottom: 0; width: 96px; background: #e8eaed; }
.gd-ruler::before{ left: 0; }
.gd-ruler::after{ right: 0; }
.gd-ruler-ticks{ position: absolute; inset: 0; z-index: 1; }
.gd-ruler-ticks i{ position: absolute; bottom: 5px; width: 1px; height: 4px; background: #9aa0a6; }
.gd-ruler-ticks i.h{ height: 7px; }
.gd-ruler-ticks span{ position: absolute; top: 4px; transform: translateX(-50%); font: 400 10px/12px Arial, sans-serif; color: #444; }
.gd-ruler-mark{ position: absolute; z-index: 2; top: 2px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid #4285f4; }
.gd-ruler-l{ left: 90px; }
.gd-ruler-r{ right: 90px; }

.gd-main{ flex: 1; min-height: 0; position: relative; display: flex; }
.gd-canvas{ flex: 1; min-width: 0; overflow: auto; position: relative; scroll-behavior: auto; }
.gd-pagewrap{ position: relative; width: 816px; margin: 10px auto 40px; }
.gd-pagewrap.has-comments{ margin-left: max(16px, calc(50% - 408px - 150px)); }
.gd-page{
  position: relative;
  width: 816px;
  min-height: 1056px;
  padding: 96px;
  background: #fff;
  box-shadow: 0 0 0 0.75pt #d1d1d1, 0 0 3pt 0.75pt #ccc;
  cursor: text;
}

.gd-editor{
  outline: none;
  font-family: Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.15;
  color: #000;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  tab-size: 48px;
  min-height: 864px;
  caret-color: #000;
}
.gd-editor :is(p, h1, h2, h3, h4, li, div){ margin: 0; }
.gd-editor h1{ font-size: 20pt; font-weight: 400; margin: 20pt 0 6pt; }
.gd-editor h2{ font-size: 16pt; font-weight: 400; margin: 18pt 0 6pt; }
.gd-editor h3{ font-size: 14pt; font-weight: 400; margin: 16pt 0 4pt; color: #434343; }
.gd-editor h4{ font-size: 12pt; font-weight: 400; margin: 14pt 0 4pt; color: #666; }
.gd-editor > :first-child{ margin-top: 0; }
.gd-editor .gd-s-title{ font-size: 26pt; margin: 0 0 3pt; }
.gd-editor .gd-s-subtitle{ font-size: 15pt; color: #666; margin: 0 0 16pt; }
.gd-editor :is(ul, ol){ margin: 0; padding-left: 48px; }
.gd-editor li{ padding-left: 6px; }
.gd-editor :is(ul, ol) :is(ul, ol){ padding-left: 36px; }
.gd-editor ul ul{ list-style-type: circle; }
.gd-editor ul ul ul{ list-style-type: square; }
.gd-editor ol ol{ list-style-type: lower-alpha; }
.gd-editor ol ol ol{ list-style-type: lower-roman; }
.gd-editor ul.gd-check{ list-style: none; padding-left: 30px; }
.gd-editor ul.gd-check > li{ position: relative; padding-left: 4px; }
.gd-editor ul.gd-check > li::before{
  content: ''; position: absolute; left: -24px; top: 0.15em;
  width: 13px; height: 13px; border: 1.5px solid #5f6368; border-radius: 2px; box-sizing: border-box; cursor: pointer;
}
.gd-editor ul.gd-check > li.is-done{ text-decoration: line-through; color: #80868b; }
.gd-editor ul.gd-check > li.is-done::before{
  background: #1a73e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/11px no-repeat;
  border-color: #1a73e8;
}
.gd-editor blockquote{ margin: 0 0 0 48px; padding: 0; border: 0; }
.gd-editor a{ color: #1155cc; text-decoration: underline; cursor: text; }
.gd-editor img{ max-width: 100%; height: auto; vertical-align: bottom; }
.gd-editor img.is-picked{ outline: 2px solid #1a73e8; }
.gd-editor hr{ border: 0; border-top: 1px solid #a6a6a6; margin: 6pt 0; }
.gd-editor table{ border-collapse: collapse; width: 100%; table-layout: fixed; margin: 4pt 0; }
.gd-editor td, .gd-editor th{ border: 1px solid #000; padding: 5pt; vertical-align: top; min-width: 20px; }
.gd-editor .gd-cmt{ background: rgba(251,188,4,0.24); border-bottom: 2px solid rgba(251,188,4,0.9); }
.gd-editor .gd-cmt.is-focus{ background: rgba(251,188,4,0.5); }
.gd-editor .gd-find{ background: #fbe9a3; }
.gd-editor.no-spell{ caret-color: #000; }
.gd.is-paint .gd-editor{ cursor: copy; }

.gd-comments{ position: absolute; top: 0; left: calc(100% + 18px); width: 280px; }
.gd-comment{
  position: absolute; left: 0; width: 280px;
  background: #fff; border-radius: 8px; padding: 12px 12px 12px 14px;
  box-shadow: 0 1px 2px rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  font: 400 14px/20px var(--gd-ui); color: var(--gd-text);
  transition: top 0.15s ease, transform 0.15s ease;
}
.gd-comment.is-focus{ transform: translateX(-10px); box-shadow: 0 2px 3px rgba(60,64,67,0.3), 0 6px 10px 4px rgba(60,64,67,0.15); }
.gd-comment-head{ display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gd-comment-head .gd-avatar{ width: 28px; height: 28px; margin: 0; font-size: 13px; box-shadow: none; }
.gd-comment-who{ flex: 1; min-width: 0; }
.gd-comment-who b{ display: block; font-weight: 500; font-size: 14px; line-height: 18px; }
.gd-comment-who small{ font-size: 12px; color: #5e5e5e; }
.gd .gd-comment .gd-btn{ width: 30px; height: 30px; border-radius: 50%; }
.gd .gd-comment .gd-btn svg{ width: 20px; height: 20px; color: #0b57d0; }
.gd-comment-text{ white-space: pre-wrap; overflow-wrap: anywhere; }
.gd .gd-comment textarea{
  width: 100%; min-height: 40px; resize: none; padding: 8px 12px;
  font: 400 14px/20px var(--gd-ui); color: var(--gd-text);
  border: 1px solid #747775; border-radius: 20px; background: #fff; outline: none;
}
.gd .gd-comment textarea:focus{ border: 2px solid var(--gd-blue); padding: 7px 11px; }
.gd-comment-actions{ display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.gd .gd-outline-toggle{ position: absolute; top: 14px; left: 20px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; }
.gd .gd-outline-toggle svg{ width: 22px; height: 22px; }
.gd-outline{ flex: none; width: 260px; padding: 12px 8px 12px 16px; overflow-y: auto; font: 400 14px/20px var(--gd-ui); }
.gd-outline[hidden]{ display: none; }
.gd-outline-head{ display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--gd-text); margin-bottom: 8px; }
.gd-outline-tab{ display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; margin: 0 4px 8px 0; border-radius: 18px; background: var(--gd-active); color: #041e49; font-weight: 500; }
.gd-outline-tab svg{ width: 18px; height: 18px; color: #0b57d0; }
.gd .gd-outline-item{ display: block; width: 100%; text-align: left; padding: 6px 12px; border-radius: 16px; color: #444746; font-size: 13px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd .gd-outline-item.l2{ padding-left: 26px; }
.gd .gd-outline-item.l3{ padding-left: 40px; }
.gd-outline-empty{ color: #5e5e5e; font-size: 13px; padding: 6px 12px; }
.gd.has-outline .gd-outline-toggle{ display: none; }

.gd-pop{
  position: fixed; z-index: 50; min-width: 200px; max-width: 420px; max-height: calc(100vh - 16px); overflow-y: auto;
  padding: 6px 0; background: #fff; border-radius: 6px;
  box-shadow: 0 2px 6px 2px rgba(60,64,67,0.15), 0 1px 2px rgba(60,64,67,0.3);
  font: 400 14px/20px var(--gd-ui); color: var(--gd-text);
}
.gd-pop[hidden]{ display: none; }
.gd .gd-mi{
  display: flex; align-items: center; width: 100%; min-height: 32px; padding: 4px 12px 4px 12px; gap: 12px;
  border-radius: 0; text-align: left; white-space: nowrap; color: var(--gd-text);
}
.gd .gd-mi:hover:not(:disabled), .gd .gd-mi.is-hot:not(:disabled){ background: #f1f3f4; }
.gd .gd-mi:disabled{ color: #a8a8a8; cursor: default; }
.gd .gd-mi:disabled svg{ color: #c7c7c7; }
.gd-mi-ico{ width: 20px; height: 20px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--gd-icon); }
.gd-mi-ico svg{ width: 20px; height: 20px; }
.gd-mi-label{ flex: 1; overflow: hidden; text-overflow: ellipsis; }
.gd-mi-key{ color: #5e5e5e; font-size: 13px; margin-left: 24px; }
.gd-mi-arrow{ width: 18px; height: 18px; color: var(--gd-icon); }
.gd-mi-arrow svg{ width: 18px; height: 18px; }
.gd-mi-sep{ height: 1px; background: #e3e3e3; margin: 6px 0; }
.gd-mi-head{ padding: 6px 12px 2px 44px; font-size: 12px; color: #5e5e5e; }
.gd-pop-search{ padding: 4px 8px 6px; }
.gd .gd-pop-search input{
  width: 100%; height: 32px; padding: 0 12px; border: 1px solid #747775; border-radius: 16px;
  font: 400 14px var(--gd-ui); color: var(--gd-text); background: #fff; box-shadow: none;
}
.gd .gd-pop-search input:focus{ outline: none; border: 2px solid var(--gd-blue); padding: 0 11px; background: #fff; box-shadow: none; }
.gd-palette{ padding: 8px 12px; }
.gd-palette-label{ font-size: 12px; color: #5e5e5e; margin: 4px 0 6px; }
.gd-palette-row{ display: flex; gap: 2px; margin-bottom: 2px; }
.gd-palette-row.gap{ margin-bottom: 8px; }
.gd .gd-chip{ width: 18px; height: 18px; border-radius: 50%; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); position: relative; }
.gd .gd-chip:hover:not(:disabled){ box-shadow: 0 0 0 1px #fff, 0 0 0 2px #5f6368; background: var(--c); }
.gd .gd-chip.is-on::after{ content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.3); }
.gd .gd-none{ display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 4px; border-radius: 4px; margin-bottom: 6px; }
.gd-grid{ padding: 10px 12px; }
.gd-grid-cells{ display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; }
.gd-grid-cells i{ width: 18px; height: 18px; border: 1px solid #c7c7c7; border-radius: 2px; cursor: pointer; }
.gd-grid-cells i.on{ border-color: #4285f4; background: #d2e3fc; }
.gd-grid-label{ text-align: center; margin-top: 6px; font-size: 13px; }
.gd-chars{ display: grid; grid-template-columns: repeat(10, 32px); gap: 2px; padding: 8px 12px; }
.gd .gd-chars button{ height: 32px; font: 400 18px Arial, sans-serif; color: #202124; }

.gd-tip{
  position: fixed; z-index: 70; pointer-events: none;
  padding: 4px 8px; border-radius: 4px; background: #3c4043; color: #fff;
  font: 500 12px/16px var(--gd-ui); white-space: nowrap; letter-spacing: 0.02em;
}
.gd-tip[hidden], .gd-toast[hidden], .gd-linkchip[hidden], .gd-scrim[hidden]{ display: none; }
.gd-toast{
  position: fixed; z-index: 70; left: 24px; bottom: 24px;
  padding: 14px 24px; border-radius: 4px; background: #313131; color: #f2f2f2;
  font: 400 14px/20px var(--gd-ui); box-shadow: 0 3px 5px -1px rgba(0,0,0,0.2), 0 6px 10px 0 rgba(0,0,0,0.14);
  max-width: min(560px, calc(100vw - 48px));
}
.gd-linkchip{
  position: fixed; z-index: 45; display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 16px; max-width: 420px; background: #fff; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
  font: 400 14px var(--gd-ui);
}
.gd-linkchip a{ color: #0b57d0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.gd .gd-linkchip .gd-btn{ width: 32px; height: 32px; border-radius: 50%; }
.gd .gd-linkchip .gd-btn svg{ width: 18px; height: 18px; }

.gd-scrim{ position: fixed; inset: 0; z-index: 60; background: rgba(32,33,36,0.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gd-dialog{
  width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; border-radius: 8px; padding: 22px 24px 20px;
  box-shadow: 0 4px 8px 3px rgba(60,64,67,0.15), 0 1px 3px rgba(60,64,67,0.3);
  font: 400 14px/20px var(--gd-ui); color: var(--gd-text);
}
.gd-dialog.is-wide{ width: min(720px, 100%); }
.gd-dialog-head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px -10px 14px 0; }
.gd-dialog-head h2{ margin: 0; font: 400 22px/28px var(--gd-ui); color: var(--gd-text); }
.gd-dialog-foot{ display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 22px; }
.gd-dialog-foot:empty{ display: none; }
.gd .gd-pill{ height: 36px; padding: 0 24px; border-radius: 18px; font: 500 14px var(--gd-ui); letter-spacing: 0.01em; color: var(--gd-blue); }
.gd .gd-pill:hover:not(:disabled){ background: rgba(11,87,208,0.08); }
.gd .gd-pill.primary{ background: var(--gd-blue); color: #fff; }
.gd .gd-pill.primary:hover:not(:disabled){ background: #0a4fbd; box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px 1px rgba(0,0,0,0.15); }
.gd .gd-pill.outlined{ border: 1px solid #747775; }
.gd .gd-pill:disabled{ color: #a8a8a8; opacity: 1; }
.gd .gd-pill.primary:disabled{ background: rgba(31,31,31,0.12); color: rgba(31,31,31,0.38); }
.gd .gd-field{
  width: 100%; height: 40px; padding: 0 12px; margin: 0;
  font: 400 14px var(--gd-ui); color: var(--gd-text); text-align: left;
  border: 1px solid #747775; border-radius: 4px; background: #fff; box-shadow: none;
}
.gd .gd-field:hover{ border-color: #1f1f1f; background: #fff; }
.gd .gd-field:focus{ outline: none; border: 2px solid var(--gd-blue); padding: 0 11px; background: #fff; box-shadow: none; }
.gd-form{ display: grid; gap: 14px; }
.gd-form label{ display: grid; gap: 6px; font-size: 13px; color: #444746; }
.gd-check-row{ display: flex !important; align-items: center; gap: 10px !important; font-size: 14px !important; color: var(--gd-text) !important; }
.gd-check-row input{ width: 18px; height: 18px; margin: 0; accent-color: var(--gd-blue); }
.gd-find-count{ font-size: 13px; color: #5e5e5e; margin-right: auto; }
.gd-count-table{ width: 100%; border-collapse: collapse; }
.gd-count-table td{ padding: 10px 0; border-bottom: 1px solid #e3e3e3; }
.gd-count-table td:last-child{ text-align: right; font-weight: 500; }
.gd-keys{ display: grid; grid-template-columns: 1fr auto; gap: 0 24px; }
.gd-keys h3{ grid-column: 1 / -1; margin: 14px 0 4px; font: 500 14px var(--gd-ui); color: var(--gd-blue); }
.gd-keys span{ padding: 6px 0; border-bottom: 1px solid #f1f3f4; }
.gd-keys kbd{ font: 400 13px var(--gd-ui); color: #444746; padding: 6px 0; border-bottom: 1px solid #f1f3f4; text-align: right; }
.gd-share-people{ display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.gd-share-people .gd-avatar{ margin: 0; box-shadow: none; }
.gd-share-people b{ display: block; font-weight: 500; }
.gd-share-people small{ color: #5e5e5e; }
.gd-share-people em{ margin-left: auto; font-style: normal; color: #5e5e5e; }
.gd-share-sec{ font: 500 16px var(--gd-ui); margin: 14px 0 4px; }
.gd-share-access{ display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.gd-share-access .lockdot{ width: 36px; height: 36px; border-radius: 50%; background: #e3e3e3; display: flex; align-items: center; justify-content: center; color: #444746; }
.gd-share-access .lockdot svg{ width: 20px; height: 20px; }
.gd-share-access small{ display: block; color: #5e5e5e; font-size: 12px; }

.gd.is-compact .gd-head, .gd.is-compact .gd-rulerbar{ display: none; }

@media (max-width: 1100px){
  .gd .gd-meet, .gd [data-act="history"]{ display: none; }
}
@media (max-width: 760px){
  .gd-titlebar{ padding: 6px 8px 2px 6px; }
  .gd .gd-share span, .gd [data-act="comments"], .gd #gd-move{ display: none; }
  .gd .gd-share{ padding: 0 12px; }
  .gd-rulerbar, .gd .gd-outline-toggle, .gd .gd-mode span{ display: none; }
  .gd-toolbar{ margin: 4px 6px 6px; }
  .gd-pagewrap{ margin-top: 8px; }
  .gd-outline{ position: absolute; z-index: 4; inset: 0 auto 0 0; background: var(--gd-bg); box-shadow: 2px 0 6px rgba(0,0,0,0.12); }
}

@media print{
  html, body, html:has(#view-essay.active){ background: #fff !important; }
  .gd{ position: static; display: block; background: #fff; }
  .gd-head, .gd-rulerbar, .gd-outline, .gd-outline-toggle, .gd-comments, .gd-pop, .gd-tip, .gd-toast, .gd-linkchip, .gd-scrim, .atmosphere{ display: none !important; }
  .gd-main, .gd-canvas{ display: block; overflow: visible; }
  .gd-pagewrap{ margin: 0 !important; width: auto; zoom: 1 !important; }
  .gd-page{ width: auto; min-height: 0 !important; padding: 0; box-shadow: none; }
  .gd-editor .gd-cmt{ background: none; border: 0; }
  @page{ margin: 1in; }
}
